Re: [PHP] Re: I'm really getting annoyed with PHP
On Wed, 23 Jul 2003 14:48:03 -0600, Kevin Stone wrote: Beauford, here's a login routine that I wrote using Sessions and Header redirects. It is my interpretation of what you are trying to do. I'm not saying this is the only way to do it but it works well for me. Compare it to what you're doing to see if you're doing anything wrong. page-whatever.php ? // -- line 1 session_start(); $thispage = http://www.yourdomain.com.$_SERVER['REQUEST_URI']; $_SESSION['return-to'] = $thispage; if($_SESSION['valid_user'] !== true) { // Access Denied! Redirect to the login screen. header(Location: http://www.yourdomain.com/login.php;); exit; } Ok, I have a question. Where is $_SESSION['valid_user'] getting set (or unset)??? Have you checked to see if your IF statement at the top of the script is working like you think it should be?? Try putting an echo in instead of the header() call and see if you get the output you think you should. I suspect this isn't a redirect isn't working issue at all but a the if isn't working like I thought it would issue. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: I'm really getting annoyed with PHP
On Thu, 24 Jul 2003 02:05:58 -0500, Wendell Brown wrote: Ok, I have a question. Where is $_SESSION['valid_user'] getting set (or unset)??? Oooops. I thought that was the code that he was talking about. I missed your lead in. Sorry!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: I'm really getting annoyed with PHP
Ok, I have a question. Where is $_SESSION['valid_user'] getting set (or unset)??? AFAICS, $_SESSION['valid_user'] is getting set by a previous page, it's a *session*. Have you checked to see if your IF statement at the top of the script is working like you think it should be?? Try putting an echo in instead of the header() call and see if you get the output you think you should. I suspect this isn't a redirect isn't working issue at all but a the if isn't working like I thought it would issue. :) Err... that wasn't the original code... that was someone else's code that worked... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: I'm really getting annoyed with PHP
* Thus wrote Wendell Brown ([EMAIL PROTECTED]): On Thu, 24 Jul 2003 02:05:58 -0500, Wendell Brown wrote: Ok, I have a question. Where is $_SESSION['valid_user'] getting set (or unset)??? Oooops. I thought that was the code that he was talking about. I missed your lead in. Sorry!!! This thread need to die... we all know it works..period Curt -- :0 * ^Subject: .*I'm really getting annoyed with PHP /dev/null -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php