<?php
function protect_vars() {
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
function cleaninput(&$value, $key) {
$value = htmlentities($value, ENT_QUOTES);
$value = trim($value);
}
?>