I have a login script which has worked fine in the past, however i need to change the IF statement. Basically all i want it to do is verify that $squadnum variable is inbetween 1-98 or is 99. I'm not even entirely sure if i need to use the ereg function and i dont think the "1-98" bit is formatted correctly, any help would be much appreciated.
Heres the code i have so far:
if (ereg("1-98", $squadnum)) { // users with id 1-98 should get sent to squad page
header("Location: squad.php");
} else if(ereg("99", $squadnum)) { // 99 is the id number of the site administrator
header("Location: admin.php");
} else {
header("Location: login.php");
}
Thanks, Nick
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php