The error means exactly what it says, $result is not a MySQL result resource meaning that there was probably an error with your query. As the messages above stated, try posting some more code to slim down your problem. When your executing your query its a good idea to stick some error handling in there as well, for example:
PHP Code:
$result = mysql_query("SELECT * FROM mytable") or die("MySQL Error: " . mysql_error());
Will display the mysql error, if there is one, and halt the script.