On Fri, 8 Jun 2001, Gabriele Bartolini wrote:

> 
> >$tname =urldecode($name);
> >$tname1 = stripslashes($tname1);
> >$updtStmt = "update vusers set orgname='$tname1' where id=$tid";
> 
> It all depends on these 2 variables settings:
> 
> magic_quotes_gpc        =       On
> magic_quotes_runtime=   Off

I grep'ed php.ini, here it is

magic_quotes_gpc        =       On              ; magic quotes for
incoming GET/POST/Cookie data

> In this case, the urldecode is in *surplus*. You should remove it, and just 
> use stripslashes.

If I remove urldecode my name returns as 'Adrian+D\'Costa' which mysql
balks at.  If I remove the stripslashes my name is without the slash but
mysql complains that it need another single quote ' to terminate the
command.  

Regards

Adrian


---------------------------------------------------------------------
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