if you want the PHP code to execute as soon as the page is loaded, just rename the extension to .PHP and hyperlink the file as normal. It will execute when the page is rendered by the server and sent back to your browser.
In order to run embedded php (or any other language) in a .html file the server has to be enabled to handle it and understand that the .html file contains code.
Usually “html” files that contain code have some sort of special extension like .php, .aspx, .cgi, etc…
if you want the PHP code to execute as soon as the page is loaded, just rename the extension to .PHP and hyperlink the file as normal. It will execute when the page is rendered by the server and sent back to your browser.
In order to run embedded php (or any other language) in a .html file the server has to be enabled to handle it and understand that the .html file contains code.
Usually “html” files that contain code have some sort of special extension like .php, .aspx, .cgi, etc…