RE: [PHP-WIN] USING PHP to add ' to SQL
| From: | Flint Doungchak | Date: | Fri, 28 Jul 2000 05:09:56 +0000 |
| Subject: | RE: [PHP-WIN] USING PHP to add ' to SQL | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1360@lists.php.net to get a copy of this message | ||
Tom,
I turned on Magic_quotes_sybase in the PHP.ini file and that seems to fix everything. Let
me know how it works for you.
Here's the snippet of my ini file...
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
magic_quotes_gpc = On ; magic quotes for incoming
GET/POST/Cookie data
magic_quotes_runtime = Off ; magic quotes for runtime-generated data,
e.g. data from SQL, from exec(), etc.
magic_quotes_sybase = On ; Use Sybase-style magic quotes (escape '
with '' instead of \')
track_vars = On ; enable $HTTP_GET_VARS[],
$HTTP_POST_VARS[] and $HTTP_COOKIE_VARS[] arrays
; automatically add files before or after any PHP 3.0 document
> -----Original Message-----
> From: TOM [mailto:tom.com@asia.com]
> Sent: Thursday, July 27, 2000 8:34 PM
> To: Flint Doungchak
> Subject: Re: [PHP-WIN] USING PHP to add ' to SQL
>
>
> Yeah! I got a "\" in front of the single quote.
> Tom
>
> ----- Original Message -----
> From: "Flint Doungchak" <Flint@netsolutionsllc.com>
> To: "'Tom.com'" <tom.com@asia.com>
> Sent: Thursday, July 27, 2000 1:48 AM
> Subject: RE: [PHP-WIN] USING PHP to add ' to SQL
>
>
> > Tom,
> >
> > Did you get a good answer to this. I saw the addslashes
> post but I still
> have a problem in
> > SQL Server 7.0 and so do others. Are you getting the same?
> >
> > Thanks,
> >
> > Flint
> >
> > > -----Original Message-----
> > > From: Tom.com [mailto:tom.com@asia.com]
> > > Sent: Wednesday, July 26, 2000 8:49 AM
> > > To: php-windows@lists.php.net
> > > Subject: [PHP-WIN] USING PHP to add ' to SQL
> > >
> > >
> > > Anybody know how to handle those characters such as " ' ", "
> > > | " etc when
> > > insert into a SQL database?
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-windows-help@lists.php.net
> > > To contact the list administrators, e-mail:
> > > php-list-admin@lists.php.net
> > >
> >
>