Check for an existing value = $input

Codes here !

Moderators: macek, egami, gesf

Post Reply

Post by Jay » Sat Aug 31, 2002 2:57 am

You're missing one line of code. The $res value you're getting is just a reference link to the actual results, not the result itself! Try this:

Code: Select all

$result = mysql_query("SELECT RTA FROM maindcp WHERE RTA = '$rga' limit 1");
if (@mysql_fetch_rows($result)) {
list($res) = mysql_fetch_row($result);
//$res is now equal to what you want
} else {
print "\$res doesn't exist";

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest