I've got in imput box where someone can submit a id, my code then displays the results based on this id, however how can i check that results are being returned, if someone enters nothing or jj for example i want to say error, no results are found.
only a guess
if(empty($result){ //no result {
if its from a db, you can use a count function. you should also check the form input first.
if(!is_int($_POST['id])){ echo 'not a valid id'; }