I wanted to use some php code on my home page but I don't know php. So I added the code and just renamed the index.html file to index.php. It seems to work fine. Is it okay to do this or will it create problems? Thanks
Renaming a page will make that all links to that page don't work any more. You must change all links to the old name to using the new name. This also affects external links, that is, links outside your site, and most principally, the links to your home page in search engine results. What you must do depends, of course, on what is your main source of visitors. At least, you should include a redirection line in the htaccess file.
no it wont, html comes first then php so aslong as there inst a file called index.html along with it it will be fine
Providing there are no internal/external links to www.domain.com/index.html (i.e. you use www.domain.com/), it should be OK to just rename the file - otherwise, you should 301 redirect index.html to index.php.
The 301 redirect worked fine for me on a site I re-did recently, changing it from a framed design to a php header and footer affair. However, I should point out that if your site has been around a while (like this one had) and google(or the search engine of your choice) has it etched permanently in it's memory banks, it will effect your search rankings. I'm no expert on search bots but I think it's because, while the spider still gets redirected to new .php page, it registers the 301 as an empty page and thus it's ranking drops. Of course if your not bothered about search rankings or you can wait the four months it'll take for google to spider your site again and register the new .php file then you have nothing to worry about.