Hi just wanted to say thanks Justin.. I've got it working with your idea .... I needed to change this line....
if($result && mysql_num_rows($result) > 0) to if ($result && mysql_num_rows($result) < 1) and it works a treat. Thanks Peter > I'm no expert, but I think $result will return true if the query was > successful, it's not dependant on if there were rows returned. > > To check if there was a row returned, use mysql_num_rows($result) > > > $result = mysql_query("SELECT * FROM resellers WHERE > company='$_POST[company]'"); > if($result && mysql_num_rows($result) > 0) > { > // insert > } > else > { > //something else > } > > > > Justin French > -------------------- > http://Indent.com.au > Web Developent & > Graphic Design > -------------------- > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php