OK guys, i've asked this one before and had no response, i am not being lazy and am still trying to research how to do this, but any additional help as i'm a novice would be appreciated.
I need a login script that checks the users input against values in a SQL database but instead of redirecting to a generic page when the values match i want to redirect the user to an individual url also stored against their login details in the SQL table.
For expample...
Username=Steve Password=123 URL=www.poo.com
Username=Dave Password=321 URL=www.wee.com
Each user would go to the page associated with their login details.
Thanks, D
Individual Redirect on login
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
You just need to get that URL from the database when you authenticate the user and then just make the redirect part dynamic by taking a variable instead of a hardcoded URL. For example you could do something like:
header(): http://www.php.net/manual/en/function.header.php
Mac
Code: Select all
header('Location: '.$from_database['URL']);Mac