...

View Full Version : Problem with slashes in FORM



smeshy123
12-01-2005, 05:37 AM
I am creating a form that eventually submits to a php script to enter into a database. In this form I have a textarea box, and in the textarea box people can enter texts, and there needs to be the ability to enter the characters " and '. The only problem is that when you click submit and it goes to the confirmation page each of those chacters is written with a slash in front of it like so: \' or \". How can I fix this?

Thanks!

Smesh

_Aerospace_Eng_
12-01-2005, 05:39 AM
$comments = stripslashes($_POST['comments']);
The main thing here is the stripslashes function. You can get more info here (http://us3.php.net/stripslashes).

smeshy123
12-02-2005, 03:47 AM
THanks a bunch!

Worked perfect!

- Smesh



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum