You really need some better error handling in your code.
I recommend that you enable error_reporting(E_ALL), to make sure that all types of error, warning, notice etc, are being logged in your error log.
A better way is to have an error handling routine which will cause the page to stop execution, recording (in the log) as much information as possible about what went wrong, giving a polite (but not helpful) message to the user.
mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
Means that a previous call to mysql_query has failed in some way but your code stupidly ignored the error and plodded on towards destruction anyway.
Mark