Forum Moderators: coopster

Message Too Old, No Replies

\"In a PHP form

Any way to eliminate the \"in a form?

         

Wandering Drifter

7:43 pm on May 30, 2003 (gmt 0)

10+ Year Member



Hello, all. I'm new to the PHP/Mysql world but I've grasped the basics and I'm developing a new PHP-based site. I really love the integration of a database and the ability to generate thumbs in PHP.

And I want a basic feedback form and maybe a FAQ feedback thing. I'm also using forms for another thing, too.

Every time there's a " in a form, the PHP program automatically turns it into \". Which is fine for plain printing, but if you enter it into a MySQL table or send it in an email, it looks funny and sloppy, for the non-programming viewers.

blah blah \"quote\"

I'm just wondering if theres any safe way to disable this without deleting any \ that the user might put into the form.

Thanks guys. I love programming.

-WD

[edited by: jatar_k at 8:22 pm (utc) on May 30, 2003]

[edited by: Wandering_Drifter at 8:55 pm (utc) on May 30, 2003]

bcolflesh

7:52 pm on May 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dear WD,
Welcome to Webmasterworld! - take a look at this man page:

us4.php.net/manual/en/function.stripslashes.php

Regards,
Brent

Wandering Drifter

8:08 pm on May 30, 2003 (gmt 0)

10+ Year Member



Hey, thanks! Just what I needed.

I've always found the PHP.net documentary a bit hard to navigate... most of what I learned comes from books and other people's scripts.

-WD

daisho

4:30 am on May 31, 2003 (gmt 0)

10+ Year Member



You may also want to turn of "MagicQuotes" as this really is the root of your problem. StripSlashes just removes what MagicQuotes did in the first place.

daisho.