RE: [PHP] redirecting after login

From: Date: Tue, 23 Jul 2002 04:09:50 +0000
Subject: RE: [PHP] redirecting after login
Groups: php.general 
Request: Send a blank email to php-general+get-109018@lists.php.net to get a copy of this message
using header() should work if you don't output anything before it. If you can restructure your code so that you can remove any output until after the header(), then that'd be the way to go. You said the meta refresh didn't work - did you get the syntax right? Since I don't use it much, it's one of those tags that takes me ages to get the syntax right (I could chuck it into a code repository somewhere, but I'm too lazy to do that...) Failing the above two methods, you could put a hidden form that gets auto-submitted when the page loads HTH Martin -----Original Message----- From: Tim Thorburn [mailto:immortal@nwconx.net] Sent: Tuesday, July 23, 2002 2:00 PM To: php-general@lists.php.net Subject: [PHP] redirecting after login Hi, A site I'm working on requires a login screen where various individuals will log into the site and add information for their various departments. Rather than setup a different script for each department, I was hoping to create one script that would either accept or deny a login based on the username/password stored in a database, then based on the username/password - redirect the individuals browser to a URL. I've got the login part working perfectly, and I can turn the URL into a link on the page, but I'd rather have the script just automatically forward the person to the page they're login gives them access to. I've tried using header(), but since the redirection takes place about mid-script, it doesn't work. I've also tried using <meta> tag redirects, but those don't seem to accept the PHP/MySQL combo. Any ideas? Thanks -Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#109018) next »