OK, on my page it checks if the user is logged in, and there are 3 possible outcomes, if the user is not logged in it should redirect them to nologin.php if they have an invalid username/password they should be redirected to badlogin.php and if the username and password are correct it should leave them on that page. heres my current code but i cant find out how to redirect.:
PHP:
<?php
if(!$_GET['uid']){
//redirect to nologin.php
}else if(!$_GET['pcode']){
//redirect to nologin.php
}else{
$users[] = file('users.log');
foreach($users as $person){
if(eregi($_POST['uid'].$_POST['pcode'],$person)){
$usrfound = true;
}
}
if(!userfound){
//redirect to badlogin.php
}else {
//do nothing
exit;
}
}
?>








