AV1611 Posted May 1, 2007 Share Posted May 1, 2007 I don't understand why this script doesn't keep people from typing the url in the browser instead of a form directing them to the site... when they type http://xxxxxx.com/index.php it displays the page but it should redirect them to the portal page?????????????? <?php if(isset($_POST['password'])){ if($_POST['password']=='xxxxxx'){ setcookie("authorized", 'AUTHORIZED', time()+14400); } else{ setcookie("authorized", 'HACKER', time()+14400); header('http://xxxxxx.com'); } } elseif(isset($_REQUEST['authorized'])){ if($_REQUEST['authorized']!='AUTHORIZED'){ setcookie("authorized", 'HACKER', time()+14400); header('http://xxxxxx.com'); } } else{ header('http://xxxxxx.com'); } Quote Link to comment https://forums.phpfreaks.com/topic/49564-solved-cookies-not-working/ Share on other sites More sharing options...
AV1611 Posted May 2, 2007 Author Share Posted May 2, 2007 DUH!!!!!!! It would help if I used the right syntax for the header() stuff... ack! Quote Link to comment https://forums.phpfreaks.com/topic/49564-solved-cookies-not-working/#findComment-243008 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.