vosgien
07-07-2003, 02:40 PM
Hi,
I am not sure how to go about this, best thing to do is explain, I think first with a little code :
<?
include("connected.php");
$query = "SELECT entryID, password, username FROM $table WHERE email = '$mail'";
$result=mysql_query($query);
if(mysql_num_rows($result))
{
print"&status=".("logon succesful")."&";
exit;
}
else
{
print"&_root.status=".("you are not registered")."&";
exit;
}
/* Close link to MySQL */
mysql_close($link);
?>
The email column is unique, however I want to check the other values are correct as well. How ?
I had thought about writing a $query for each value, which seems a bit long winded to me, can I convert the other values to an array and then check them agains't user input, and if so HOW ?
Anyhow, I will keep trying, in the meantime, any help, pointers etc etc
Cheers
Vosgien
p.s. I think it is one of those things that is probably staring me in the face !!!
I am not sure how to go about this, best thing to do is explain, I think first with a little code :
<?
include("connected.php");
$query = "SELECT entryID, password, username FROM $table WHERE email = '$mail'";
$result=mysql_query($query);
if(mysql_num_rows($result))
{
print"&status=".("logon succesful")."&";
exit;
}
else
{
print"&_root.status=".("you are not registered")."&";
exit;
}
/* Close link to MySQL */
mysql_close($link);
?>
The email column is unique, however I want to check the other values are correct as well. How ?
I had thought about writing a $query for each value, which seems a bit long winded to me, can I convert the other values to an array and then check them agains't user input, and if so HOW ?
Anyhow, I will keep trying, in the meantime, any help, pointers etc etc
Cheers
Vosgien
p.s. I think it is one of those things that is probably staring me in the face !!!