Hi guys,
can you please help me with this function it does not work....
function checkadmin()
{
global $link;
$query="SELECT admin_type FROM admin WHERE admin_type='yes'";
$result=mysql_query($query, $link)
or die("checkPass fatal error: ".mysql_error());
// Check exactly one row is found:
if(mysql_num_rows($result)==1)
{
$row=mysql_fetch_array($result);
return print "yes";
}
//admin type no:
return false;
}
I would like to check if the admin_type is yes if it is yes then print out "yes" or print out a space......
any help would be much appricated