Page 1 of 1
Help me
Posted: Fri Jun 27, 2003 11:01 am
by wugang_bob
Code: Select all
<?php
$query = "select * from userid where username='" .$_REQUEST['username'] ."'";
$result=mysql_db_query($query);
if(mysql_num_rows($result)==1)
{
header("Location: fail3.php");
exit;
}
?>
else ........
Execute the above code, no error message, but it seem does not work.
Thank you
Admin Edit note: Use the PHP BBCode tags. please.
Posted: Fri Jun 27, 2003 11:42 am
by phice
Be sure to add an "or die()" to your mysql_db_query function.
Code: Select all
$query = "select * from userid where username='" .$_REQUEST['username'] ."'";
$result=mysql_db_query($query) or die("<B>Unable to exicute code from the query:</B><BR>\n" . $query . "<P><B>MySQL Error given:</B><BR>\n" . mysql_error());
if(mysql_num_rows($result)==1)
{
header("Location: fail3.php");
exit;
}
Give that a try, and post back the results you get, please.

Posted: Fri Jun 27, 2003 11:43 am
by jason
What's your Query look like at runtime (echo $query;), and are there any mysql errors? (echo mysql_error(); after mysql_query()).
Thank you for your help
Posted: Sat Jul 05, 2003 7:43 am
by wugang_bob
Now, It's work
Thank you
