mysql_num_rows returns the number of rows or false. The docs
. So you should test against > 0
The mysql library is deprecated - there is a stark warning against its use on the docs page - and will be removed in the future.
tag is obsolete.
Your LI tag is not closed properly, so your HTML is mal-formed.