Thank you for the tip Johnny, I'll copy that code to a snippet and use that 
from now on.

(C:


>From: "Johnny Withers" <[EMAIL PROTECTED]>
>To: "'Curtis Gordon'" <[EMAIL PROTECTED]>
>Subject: RE: persistant insert trouble
>Date: Tue, 30 Oct 2001 08:04:58 -0600
>
>Next time, instead of banging your head on the desk
>trying to figure out why somehting like this doesn't
>work, add some error checking to your PHP script.
>
>$query="INSERT INTO "
>       ."duser(username, upass, fname, lname, hphone, "
>       ."haddress, hcity, hstate, hcountry, hemail, utype) "
>       ."VALUES('$username','$upass'.'$fname','$lname','$hphone','"
>
>."$haddress','$hcity','$hstate','$hcountry','$hemail','$utype');"
>;
>if(!mysql_query($query)) {
>       $errMsg="Failed Query: $query<br>\n".mysql_errno()." :
>".mysql_error();
>       die($errMsg);
>}
>
>
>
>Your sanity will be safe.
>
>---------------------
>Johnny Withers
>[EMAIL PROTECTED]
>p. 601.853.0211
>c. 601.209.4985
>
>-----Original Message-----
>From: Curtis Gordon [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 29, 2001 6:39 PM
>To: [EMAIL PROTECTED]
>Subject: persistant insert trouble
>
>
>"INSERT INTO duser (username, upass, fname, lname, hphone, haddress,
>hcity,
>hstate, hcountry, hemail, utype) VALUES
>('$username','$upass'.'$fname','$lname','$hphone','$haddress','$hcity','
>$hstate','$hcountry','$hemail','$utype')"
>
>this is an insert statement that works fine in the console, but not from
>a
>web document, I can update, and remove rows just fine using either
>method.
>
>Can anybody see a problem with this statement, I fear I have been
>staring
>and cursing at it too long to discover a problem on my own!
>
>I'm not sure if it matters here or not but I'm using win32, PHP4 and the
>
>latest mySQL binary distro.
>
>Thank you in advance
>(C:
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to