RE: [PHP] Strange error in PHP/MySQL
| From: | Brad Fuller | Date: | Mon, 02 Oct 2006 14:32:52 +0000 |
| Subject: | RE: [PHP] Strange error in PHP/MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242478@lists.php.net to get a copy of this message | ||
> if (mysql_query($sqlInsertUser, $conn))
> $messagesqlInsertUser = 'Success...';
> else
> $messagesqlInsertUser = 'Error: ' . mysql_error();
> $result = mysql_query($sqlInsertUser);
I see this being executed twice. -> mysql_query($sqlInsertUser); I
believe that is your problem. Change the above code to look like this.
$result = mysql_query($sqlInsertUser);
if($result){
$messagesqlInsertUser = 'Success...';
}else{
$messagesqlInsertUser = 'Error: ' . mysql_error();
}
Cheers,
Brad