So im trying to make a password login and im getting errors.
i got past my Unable to jump to row 0 error with this:
mysql_num_rows($result) >= 1
but now it wont jump to the row when the password is correct ether :/
here is the code; whats wrong with it?
$result = mysql_query("SELECT * FROM users WHERE CallSign LIKE '".$_POST['signin']."'");
$result1 = mysql_query("SELECT * FROM users WHERE Password1 LIKE '".$_POST['password']."'");
if (mysql_num_rows($result) >= 1 || mysql_num_rows($result1) >= 1)
{
die('Could not connect: ' . mysql_error());
}
else if (mysql_result($result, 0) == mysql_result($result1, 0))
{
echo "<br>CallSign matches password";
setcookie("user", $_POST['signin']);
}
else
{
echo "<br>Incorrect Password/Callsign";
}