> how do i check if user exist?
> I tried...
> $result = mysql_query("SELECT count(uname) FROM users WHERE
> uname=\'$username@$domain\'");
Get rid of the \ there. You are inside a ", not a ', and the \ is wrong.
Also, add some error checking like:
if (!$result){
echo "MySQL error ", m
$result = mysql_query("SELECT uname FROM users WHERE
uname=\'$username@$domain\'");
$numrows = mysql_num_rows($result);
if ($numrows == '1') {
echo "User already exists";
} else {
echo "User don't exist";
}
Best Regards
Fredrik A. Takle
Bergen, Norway
"Ker Ruben Ramos" <[EMAIL PROTECTED]>
2 matches
Mail list logo