View Full Version : Problem with slashes in FORM

12-01-2005, 06: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?



12-01-2005, 06: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).

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

Worked perfect!

- Smesh