I have created pages on .html and used php codes into the page... Everything was going fine when i was using a different hosting. now i have changed my hosting and suddenly everything washed out.. html codes are working fine on the page but the php code on same page is not working. What could be the issue??
Basically you have to tell your web server to treat .html as .php, running them through the php processor before sending them to the visitor.. http://php.about.com/od/advancedphp/p/html_php.htm
why not convert those html pages to php ? as JamesColin said..the web server is not treating them as dynamic pages..
Just change the .html to .php and they should run. (Someone at your old hosting company modified the server to work for people who don't understand how servers work. The standard is to use the proper file extension - .php in this case.)
Always keep html separate from php as much as you can. Or just rename the file to .php and put this into your .htaccess: This one makes all .php to be called as .html. RewriteEngine On RewriteRule ^(.+)\.html$ $1.php [QSA,L] PHP: This one for just one script: RewriteEngine On RewriteRule ^scriptname\.html$ /scriptname.php [QSA,L] PHP:
i like to keep php in php files, but just adjust your config files to let your server know theres php in there.