Re: Quotes driving me crazy :-)

From: Date: Thu, 29 Jun 2000 02:36:40 +0000
Subject: Re: Quotes driving me crazy :-)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-724@lists.php.net to get a copy of this message
> [Working with PHP3 on a shared NT server. No access to php.ini. ODBC > connection to an MS SQL Server 7 database] > > I was having problems with single quotes. The magic_quotes setup in the > ISP's php.ini was driving my SQL Server 7 nuts. The following two lines > took care of all the insert display problems I was having: > > $sql = str_replace("\'","''",$sql); > $sql = stripslashes($sql); > > The first allowed me to insert the singles and the second the doubles. ALternatively you could have turned on magic_quotes_sybase in your php.ini then \' would be '' instead. > <a href="/pageonmysite.html">A page</a> hangs up the insert form. Why? -Rasmus

« previous php.db (#724) next »