Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-01-2005, 05:37 AM   PM User | #1
smeshy123
New Coder

 
Join Date: Nov 2004
Posts: 91
Thanks: 1
Thanked 0 Times in 0 Posts
smeshy123 is an unknown quantity at this point
Problem with slashes in FORM

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
smeshy123 is offline   Reply With Quote
Old 12-01-2005, 05:39 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
PHP Code:
$comments stripslashes($_POST['comments']); 
The main thing here is the stripslashes function. You can get more info here.
_Aerospace_Eng_ is offline   Reply With Quote
Old 12-02-2005, 03:47 AM   PM User | #3
smeshy123
New Coder

 
Join Date: Nov 2004
Posts: 91
Thanks: 1
Thanked 0 Times in 0 Posts
smeshy123 is an unknown quantity at this point
THanks a bunch!

Worked perfect!

- Smesh
smeshy123 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:04 AM.


Advertisement
Log in to turn off these ads.