I have the members enter through a login.php page that uses this script which is at the top of the login page. which checks the users status to ensure they are a member by looking in the approprite field to see if the status USER has been give to that person.
<?php require_once('Connections/connChile.php'); ?>
<?php
// This section is only run when the form has been submitted
if($HTTP_POST_VARS['Submit']=='Login'){
session_start();
// Check whether the login details are correct, and put
// the user status into a session variable.
$statusCheck = check_login($HTTP_POST_VARS);
if ($statusCheck == "Admin" || $statusCheck == "user"){
session_register("statusCheck");
header("Location: eventReg.php");
}
}
?>
In the page eventView.php I have this script
<?php require_once('Connections/connChile.php'); ?>
<?php
session_start();
// If the user logs out, destroy their session
if($HTTP_GET_VARS['action']=='logout'){
session_unregister("statusCheck");
session_destroy(); }
// If no session is set, redirect to login.php
if (!session_is_registered("statusCheck"))
header("Location: login.php");
?>
which wont let the user view the page unless he goes through the login page.
I have a field in the dba that is set to either a 1 or 2. I am trying to get this variable to display different content on the eventView.php page. But i am not sure how to do this. because it takes the data from the http and not from the field in the dba