Re: addslashes($variable)?

From: Date: Mon, 02 Sep 2002 01:09:13 +0000
Subject: Re: addslashes($variable)?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114859@lists.php.net to get a copy of this message
on 01/09/02 10:23 PM, cLeAnEr (cleaner@constrictor.nu) wrote: > Hi. > I have recently started prograemming some php. Now I wonder exactly what > addslashes() is good for... > I´ve read about it that it insert slashes where needed to get data in right > form to Mysql? and then use stripeslashes() to remove slashes when reciving > data out of database? Yes. Depending on your server set-up, adding strings to your database which include quotes will produce errors. Escaping them (adding a slash) will prevent this, and then the slashes will to be removed on the way out of the DB. Justin

« previous php.general (#114859) next »