I have the following function () and it does not give answer:
“This <b>Username</b> is not valid” ;
Do you know why it does not shows any response in window?
Is possible that function gives only true or false and not echo, I hope you can help. My code for function.
function validation_search ()
{
if (isset($_POST[‘fname’]))
{
if ($un!=””)
{ $query = “SELECT usernames FROM users WHERE username=’$un'”;
$result = mysql_query($query) or die (“SQL error: $query — ” . mysql_error());
$num_rows = mysql_num_rows($result); //Check how many rows are in result
if($num_rows > 0) {}
else {echo “This <b>Username</b> is not valid” ;
return false;}
}
else {}
}
else
{}
}