Re: Re: MySQL Problem with PHP

From: Date: Wed, 26 Jun 2002 13:52:16 +0000
Subject: Re: Re: MySQL Problem with PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103967@lists.php.net to get a copy of this message
On Wednesday, June 26, 2002, at 08:58 AM, John Holmes wrote:
I just preg_replace("/\'/","\'",$text) and all was good :o)
That's what addslashes() is for. It handles single and double quotes, backslashes, and nulls, so you won't have any problems...
Plus IIRC it's a C extension so it'll run faster anyway. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#103967) next »