Jump to content

crocop1

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

crocop1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi im sort of new to the sql thing and i made a function like this to protect from xss and sql injection: function protect_from_xss($s){ $s = htmlentities($s); return $s; } and function protect_from_sql($s){ $s = mysql_real_escape_string($s); return $s; } however, say i have a part of my website where they post comments and sometimes people will use the ' or " in their comment and it will show up as \' or \".. how can i clean it without adding slashes?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.