SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    special characters help in feedback form

    Hi

    On one of my customers websites, I have a feedback form that automatically adds the feedback to the testimonials page by adding it to the testimonials database table and displays it on the testimonials page

    I have noticed that if a special character like a ' or something, the feedback is not added

    I can't remember how to do it so that the feedback is added if it has a special character in the text

    Can someone help please

    Kind regards

    Ian

  2. #2
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    352
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    http://php.net/manual/en/function.addslashes.php
    PHP Code:


    <?php
    $str 
    "Is your name O'reilly?";

    // Outputs: Is your name O\'reilly?
    echo addslashes($str);
    ?>
    Sr. Website Developer and Internet Marketing
    www.CarlosJa.com Note: If anyone
    needs to get ahold of me please feel free to email me through
    my site. Apparently i missed quite a few private messages.


Bookmarks

Posting Permissions

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