Hi guys.I'd like to find out the way of redirecting a user after a successful log-in to a page called "first.php".I guess I'll need like to implement it into the script below so what's the minimal option of doing it ? Thank you for any comments.
----------------------------------------------------
$sql = mysql_query("SELECT * FROM usersystem WHERE username = '$username' AND password = '$password' LIMIT 1") or die(mysql_error());
//check to see how many rows were returned
$rows = mysql_num_rows($sql);
if (($rows)<=0)
{
echo "Incorrect username/password";
}
else
{
//have them logged in
$_SESSION['username'] = $username;
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
----------------------------------------------------
$sql = mysql_query("SELECT * FROM usersystem WHERE username = '$username' AND password = '$password' LIMIT 1") or die(mysql_error());
//check to see how many rows were returned
$rows = mysql_num_rows($sql);
if (($rows)<=0)
{
echo "Incorrect username/password";
}
else
{
//have them logged in
$_SESSION['username'] = $username;
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>