Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2004
    Posts
    91
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    PHP Code:
    $comments stripslashes($_POST['comments']); 
    The main thing here is the stripslashes function. You can get more info here.

  • #3
    New Coder
    Join Date
    Nov 2004
    Posts
    91
    Thanks
    1
    Thanked 0 Times in 0 Posts
    THanks a bunch!

    Worked perfect!

    - Smesh


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •