View Single Post
Old 10-24-2009, 07:38 PM   #3 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

You're using mysql_num_rows() in 2 places and I'm guessing that it is the second one (after the INSERT) that is causing the error?

mysql_num_rows() only works on SELECT statements, for your INSERT statement, try using mysql_affected_rows() instead - that should return 1 if the new info was inserted into the database, or -1 if there was a problem.

More info: http://uk.php.net/manual/en/function...ected-rows.php
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote