Re: [PHP] addslashes($variable)?

2002-09-01 Thread Justin French

on 01/09/02 10:23 PM, cLeAnEr ([EMAIL PROTECTED]) 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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] addslashes($variable)?

2002-09-01 Thread cLeAnEr

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?

And I´ve also got this article that its good for not getting a harmful query
along with my own query
$sql="SELECT * FROM adresses;DELETE * FROM adress"  ???

plz explain to me!

reg: Niclas



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php