Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Escaping...

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
This is really weird. For some reason, when submitting a form via POST or GET it escapes the ' and " charachters. For example;

"test"

comes out as

\"test\"

This is REALLY annoying. Is there a way to get rid of those? I seem to remember something like htmlescape(), but I cant find the page again :(

Thanks

Andy
 
use the stripslashes() function to get rid of the slashes It's not a lie if YOU believe it ;-)
 
if you want rid of just the slashes, stripslashes() is the best way to go.
if you wanna lose the quotes and slashes, use

str_replace("/\\", "", $fieldname);

and it'll search and destory, RESISTANCE IS FUTILE!
sorry.. get a bit carried away with that one sometimes.
Cheers. /Sib
programmer in the making
icq: 44167565
e-mail: siberdude@ntlworld.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top