phppup Posted July 2, 2022 Share Posted July 2, 2022 (edited) Suppose a file contains a form with action="" The HTML form self evaluates with PHP that is in the same file. Perhaps the HTML includes PHP tags for error messages to be displayed (which I've seen in HTML files). Does it matter whether the file itself is stored as a PHP file versus an HTML file? Edited July 2, 2022 by phppup Quote Link to comment https://forums.phpfreaks.com/topic/314991-file-extension-when-mixing-php-and-html/ Share on other sites More sharing options...
Solution Barand Posted July 2, 2022 Solution Share Posted July 2, 2022 20 minutes ago, phppup said: Does it matter whether the file itself is stored as a PHP file versus an HTML file? Yes. PHP code in an .html file will not be processed. However, a .php file does not need to contain any PHP code; it can just contain HTML and will function as an .html file. Quote Link to comment https://forums.phpfreaks.com/topic/314991-file-extension-when-mixing-php-and-html/#findComment-1597895 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.