Adjusting login for redirect
Posted: Sat Jul 23, 2005 8:13 am
I am using a login script for access to a page. Would like to adjust it to automatically redirect to a page depending on login. The current table structrue for the login database is:
id int(11) No auto_increment
Uname varchar(30) Yes NULL
Email varchar(30) Yes NULL
Fname varchar(30) Yes NULL
Lname varchar(30) Yes NULL
Pword varchar(30) Yes NULL
Would want to add a column to include page to redirect to, but not sure how the syntax for the code would go to have it redirect there?
$query = ("SELECT * FROM `loginphp` WHERE `Uname` = '$Uname' and 'Pword` = '$Pword'");
$result = mysql_query($query) or die("Query Fail");
if (mysql_num_rows($result) == 0)
{
echo "User Does not Exist";
} else
{
<meta http-equiv="refresh" content="0;URL=dedicated_user_page.php">
id int(11) No auto_increment
Uname varchar(30) Yes NULL
Email varchar(30) Yes NULL
Fname varchar(30) Yes NULL
Lname varchar(30) Yes NULL
Pword varchar(30) Yes NULL
Would want to add a column to include page to redirect to, but not sure how the syntax for the code would go to have it redirect there?
$query = ("SELECT * FROM `loginphp` WHERE `Uname` = '$Uname' and 'Pword` = '$Pword'");
$result = mysql_query($query) or die("Query Fail");
if (mysql_num_rows($result) == 0)
{
echo "User Does not Exist";
} else
{
<meta http-equiv="refresh" content="0;URL=dedicated_user_page.php">