Parsing PHP in HTML pages
With a little tweek of the .htaccess file it is possible to use php codes from within your regular html pages. The pages will be parsed just as if they were native .php pages.
Edit the .htaccess file
Go to your website's root and look for the file named .htaccess. If it's not there, create a blank text file using NotePad or your favourite plain text editor and save it as .htaccess
Edit the .htaccess file by adding the following lines.
RemoveHandler .html .htm
Save and upload the .htaccess file to your webserver.
Some hosts are set up differently (Heart Internet for example). If you find the above fails to work with your website, try this code in your .htaccess file instead. Replace .html with .htm if that is the extension you have used for your pages.
AddHandler cgi-script .html