OK. I have this PHP code below to search a sql database.
$query = mysql_query('SELECT guest_number FROM serial_numbers WHERE guest_name = "'.mysql_real_escape_string($name).'" ORDER BY guest_number ASC');
$row = mysql_fetch_assoc($query) or die(mysql_error());
I know that $row[‘guest_number’] will return what I’m looking for…as long as there is a result. How do I handle a situation when there is no ‘guest_number’ where ‘guest_name’ equals $name?
I had this situation happen on one of my pages. I viewed the source and everything on the page turned out fine until the php code. After the code, no more HTML was printed.
Any suggestions or useful links?