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 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2003
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    special character handling

    I have a forum and in add/edit/quote/reply, people can preview what they have entered, but if they entered special charecter like " ' (double or single quote), the php will generate a \" \' in the preview and in the form field, so when they submit, the \ will also appear.

    How can I handle this...

    the column field is called $body

    where and how should I solve it?

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This will get rid of those slashes:

    PHP Code:
    <?php

    stripslashes
    ($body);

    ?>


  •  

    Posting Permissions

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