Hi there what i am wanting to do is for each username and password in a database i have a different url for it to go to. So what i am wanting to do is in my login script where it tells it to go to the location after login is to retrieve the URL for that username and password and send them to it. If you could helpl i would be grateful thanx
See the header() function in the PHP documentation.
yeah thats what im using but i need to know how to retrieve the url for a certain user and use the header function to send them to that url
header("Location:[url]http://www.yourdomain.com/path/to/script[/url]");
Is that what you wanted to know?
For more details, read this: [man]header()[/man]
no i want to retrieve the url from the database for a user so each different user has a different url to go to then from the login and password they use tell it to go to that url which is kept in the database
Ok then, try this:
$url = "Location:" . $url_from_db; header($url);
do i need to tell it to do sumin like this
$url="SELECT url FROM users WHERE username='$username' and password='$password'"
Yep. Something like that and this.
$query="SELECT url FROM users WHERE username='$username' and password='$password'"; $res=mysql_query($query); $url=mysql_result($res,0) header('Location: '.$url);
thanks that worked