why is mysql inputting twice?
| From: | Zac Hillier | Date: | Wed, 08 May 2002 16:33:16 +0000 |
| Subject: | why is mysql inputting twice? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13631@lists.php.net to get a copy of this message | ||
Hi All,
I'm new and obviously stupid because I can't work out why php is inputting my data into
mysql twice? I'm using PHP 4.2 with IIS on MS Server 2000 with MySql 3.23.49-nt.
My code reads:
#$inp = 'INSERT into usr (usrNme, eml, pss, htmlE) values ("' .
$HTTP_POST_VARS["name"] . '", "' . $HTTP_POST_VARS["email"]
. '", "' . $HTTP_POST_VARS["pass"] . '", "' .
$HTTP_POST_VARS["htmlEml"] . '");'
#-- check update has happened
if (!mysql_query($inp)) {
Print "Error in adding to db.";
}else{ #-- send to lg
#-- redirect
header('Location: /includes/lg.php?u=' . $HTTP_POST_VARS["email"]);
exit;
} #-- endif checking update
Any help greatly appreciated.
Thanks,
Zac