I have the following question:
I have two files: 1) localhost/myService.php and 2) localhost/myService.html . Both files start with the following:
<?php
// Start up your PHP Session
session_start();
// If the user is not logged in send him/her to the login form
if ($_SESSION["Login"] != "YES") {
header("Location: Develop-index.html");
}
?>
<!DOCTYPE html>
<!--[if lt IE 8 ]><html class="no-js ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="no-js ie ie8" lang="en"> <![endif]-->
....
Is there any particular reason why with an emptied cache browser the link localhost/myService.php prevents me from accessing localhost/Develop-index.html (the desired behavior) whereas the link localhost/myService.html allows me to access localhost/Develop-index.html (not the desired behavior)?
Why session works in the first (.php) and not in the second (.html) case? Isn't the session script executed on both cases? Is it maybe because of the .html or .php at the end of the files that affects the php preprocessor?
Thank you friends!