Feedback form in php help required

by 6 replies
7
On my website I have a feedback form that stored content of the form in the feedback table. But when people use singel quotes or double quotes in it the feedback form is giving an error. For normal text its working fine. How can I solve this problem?

Can someone help please
#programming #feedback #form #php #required
  • If you convert the quotes to HTML entities as soon as the form data is submitted, it should solve the problem.

    $encodedData = htmlentities($feedbackFormData, ENT_QUOTES);

    For more info...

    PHP: htmlentities - Manual
    • [1] reply
    • Ok But can i know when i fetch this data again then will it show as single quote or something else?
      • [1] reply
  • Hello

    You can use mysql function
    mysql_real_escape_string($_POST['feedback'])

Next Topics on Trending Feed

  • 7

    On my website I have a feedback form that stored content of the form in the feedback table. But when people use singel quotes or double quotes in it the feedback form is giving an error. For normal text its working fine. How can I solve this problem? Can someone help please