[SOLVED] error checking
Posted: Mon Apr 11, 2005 1:14 am
Hi,
Should something like this work .. it only seems to prompt if there is an error in sql1 put still passes if there is an error in sql2
Thanks
Should something like this work .. it only seems to prompt if there is an error in sql1 put still passes if there is an error in sql2
Code: Select all
} else {
$sql1 = "INSERT INTO table (..) VALUES(..";
$result1 = mysql_query($sql1);
$sql2 = "INSERT INTO table (..) VALUES('..)";
$result2 = mysql_query($sql2);
if ((!$result1) || (!result2)) {
echo 'error';
} else {
echo 'successs';