now I just get redirected to the login page no matter what. THis is from the login page:
function access() {
global $username_form, $password_form, $username;
$result = mysql_query("SELECT id FROM admins WHERE username = '$username_form' AND password = '$password_form'") or die ("Invalid");
if($resultset = mysql_fetch_array($result)) {
session_start("admin");
$username = 'admin';
session_register('username');
Header("Location: Admin.php?op=language");
} else {
Header("Location: Admin.php");
}
}
and on one of the admin pages:
function admincheck() {
global $username;
if ($username != 'admin'){
Header("Location: Admin.php");
}
}
now, any page that I call that function on just redirects to the main page