php help: login redirection
- Started
- Last post
- 2 Responses
- hiten
So i have a basic login page made. But now i want the users to be redirected to different pages after they have logged. The mysql database only has 2 fields username and password. I dont care which one is used to redirect but how would i make a php page that will redirect based one those.
- freshlysqueezed0
have the PHP script check the username/password entered matches that in the MySQL db and if so, use JS or a meta redirect to send the user to the appropriate page.
Obviously you'll need to use cookies if you need the user logged in to a variety of features/pages...
- deplifer0
Well php dont have Specific Redirect methods as Java or Javascript has.
So you will have to user headers
to redirect check out
http://www.php.net/header
search for redirect.Good article on making a Page Controller.
http://www.onlamp.com/pub/a/php/…Good php articles
http://www.onlamp.com/pub/q/all_…