I have a registration system that checks a DB to confirm that rates and dates for that year are in place before allowing a customer to continue. That work fine, But I want to be able to use and test the system without it being accessible to others. So I was thinking I could just do http://www.mysite.com?bypass=1 That also works, the problem is that the index page also does all of the processing of the registration (3 steps) and I can't seam to keep access to the page
This is what I came up with but it don't work... It locks people out fine and allows me in with GET, but the sessions aren't working like I was thinking they would...
Code: Select all
// make sure the information for registrations is set up in the system or else give them and error page
if ($_GET["bypass"] == "yes" || $_SESSION['bypass'] == "1")
{
session_start();
// store session data
$_SESSION['bypass']=1;
}else{
if ($reg_year != date("Y"))
{
include_once('not_aval.php');
die;
}
}