I have set up a login page in php. I'm using the if statements for the query results. Basically what I'm trying to do is if the user ID is found then automatically go to another page. What is the proper syntax in PHP. I want to link to a page like <a href="myhome.php"</a>. Here part of the code;
mysql_select_db("mylogin",$conn) or die("Could not select database"
$sql = "select userid from logins where userID='$userID' and passID = '$passID'";
$result=mysql_query($sql);
if (mysql_num_rows($result)==0)
{
print "<h2>Invalid Username or Password.</h2>";
}else{
THIS IS WHERE I NEED THE LINK TO BE AT. IF THE USER NAME IS FOUND THEN THE LINK HERE WILL AUTOMATICALLY SED THE USER TO ANOTHER PAGE.
}
?>
Thank You
Kyle
mysql_select_db("mylogin",$conn) or die("Could not select database"
$sql = "select userid from logins where userID='$userID' and passID = '$passID'";
$result=mysql_query($sql);
if (mysql_num_rows($result)==0)
{
print "<h2>Invalid Username or Password.</h2>";
}else{
THIS IS WHERE I NEED THE LINK TO BE AT. IF THE USER NAME IS FOUND THEN THE LINK HERE WILL AUTOMATICALLY SED THE USER TO ANOTHER PAGE.
}
?>
Thank You
Kyle