I’m trying to create a popup using PHP without MySql. It will popup saying “Enter Password:” and if the password that I entered in the code is correct, it will allow them to view the page content. Pretty simple, and no need for MySql. Problem is.. Not so good with PHP.
//index.php
<?php
if ($_GET['error'] == 1)
{
echo "Incorrect Password!";
}
elseif ($_GET['error'] == 2)
{
echo "You need to be logged in to view this page!";
}
// Do the form stuff
?>
<form method="POST" action="checklogin.php" >
<etcc>
</form>
//members.php
session_start();
if(!session_is_registered(loggedin)){
Header("Location:index.php?error=2");
}
// Rest of code