I have 30 html forms on a single page and I use ajax for 25 of those forms. All 30 of the forms can still be posted even if the user has javascript disabled since it will just use PHP and not ajax.
For example, my PHP code for the page looks something like this
if (!empty($_POST)) {
require '/database-connect-file.php';
require '/functions.php';
$mysqli = connectToDatabase();
require '/what-form-if-else-statements.php';
}
The functions.php
page has 400 lines of code.
Will PHP have to process all 500 lines of code in the if statement that barely ever gets run since most users do have javascript enabled? Does PHP have to interpret the required files each and every time the page is loaded, even if there is empty post variable normally?