Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isset($_POST['q']))
- $search = sanitize($_POST['q']);
- else if (isset($_GET['q']))
- $search = sanitize($_GET['q']);
- function sanitize($str) {
- $str = strip_tags($str);
- $str = str_replace("&", "&", $str);
- $str = htmlspecialchars($str, ENT_QUOTES, "ISO-8859-1");
- return $str;
- }
Advertisement
Add Comment
Please, Sign In to add comment