Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/w0rd/public_html/trid3nt/BEM/my_classroom/upload_image.php on line 23
This error indicates that the result is not valid because there is probably an error with your query.
Output the query to the browser and see that it is using correct syntax and that the table and fields you are trying to access actually exist.
this is probably what it looks like:
SELECT Gallery, Image FROM johndoe_galleries WHERE (Image="myimage.gif" AND Gallery="mygallery")
try using single quotes within the query. I don't know if that is the problem, but it's worth a try.
you are using mysql_num_rows correctly.
what book are you looking at?