Re: addslashes

From: Date: Thu, 28 Sep 2000 07:21:05 +0000
Subject: Re: addslashes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17871@lists.php.net to get a copy of this message
Gday, show us your insert statment? I always use " in my insert statments like this: insert into table (blah) values ("$blah"); or $SQL = "insert into table (blah) values (\"$blah\")"; from within PHP Matta Joseph Blythe wrote: > > Hey, > > Now that I can't use the htmlspecialchars() etc.. I am forced to use > addslashes() until I upgrade, and I want to wait until php 4.03 is > officially out. > > My problem is that when I use: > > $Name = "O'Connell"; > > $Name = addslashes($Name); > > Then try and do a mysql_insert it spits the dummy as the ' has not been > escaped. > > Does anyone know why this isn't working, I have used this before with no > problem? > > I really don't wnat to do an ereg_replace on the insert, and again for > viewing. > > Also magic_quotes_runtime is on, so I shouldn't need to do this at all > should I hmmm... > > I may be forced to upgrade yet :-) > > Regards, > > Joseph > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Matt Allen Linux/PHP eCommerce Solutions Linux Worx Linux Networking www.linuxworx.com.au Consulting matt@linuxworx.com.au 0413 777 771

« previous php.general (#17871) next »