This question already has an answer here:
i just trying to create php form
<?php
$category = $_POST['category'];
$length = $_POST['length'];
$con = mysql_connect("localhost","globalex","[?H~hS=Oc=ES");
$db = mysql_select_db("globalex",$con);
$query = "SELECT list FROM answers WHERE category = '$category' AND length = '$length'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)) {
echo 'Category '. $category .' '. $length .' letters: ';
echo '<b>'. $row['0'].'</b><br>';
}
?>
how to add message not found when the query has no result? thank you.
</div>