.php with HTML versus .html with PHP .php with HTML versus .html with PHP php php

.php with HTML versus .html with PHP


It should be a PHP file with HTML "weaved" into it. By default if your server sees an HTML file it does not think it needs to process scripts on the page and will render it. If it sees a PHP extension, it knows it needs to run through the PHP Processor.

You can modify your htaccess to allow HTML to be rendered through the processor, but there really is no need for you to be modding that, especially if you are a beginner.


You use PHP files with HTML in it


You should "weave" html into php files That way you know for sure your code will work on any server, and not just on servers that renders html files as php.