Okay I would like to have a MySql database the holds client into like, username, pw, company, and url direct. (Which I have already done)
I would like to have client login which when the client enters there correct information, it takes them to their page. I have the login down, I just can't figure out how to make it redirect. By the way, I used Dreamweaver to create the login. (don't hold that against me)
Let me know your thoughts.
Login and Re-Direct
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Code: Select all
$result = mysql_query(' .... ') or die(mysql_error()); // fetch user info, aswell as check against username and password
if (mysql_num_rows($result) > 0) //user was found
{
$row = mysql_fetch_assoc($result);
header('Location: http://domain.com/profile.php?id='. $row['id']);
exit();
}- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
you can use headers_sent() to judge how you should output the redirection, potentially.