Database was not selected, or connection was not opened, or there is no records in recordset (use mysql_num_rows($result))
------------------------
With best regards,
Serge Bulanov
AlarIT Web developer,
www.AlarIT.com