אני מאבטח באמצעות הפונק הבאה (לפי מה שהבנתי, GET ו POST, אבל בPOST אני לא שם mysql_real_escape_String בכל מקרה תראה של GET )
PHP קוד:
function protectGET($string) {
$way = "get"; // write POST or GET to protect
if($way == "post") {
$rem = $_POST[$string];
} else {
$rem = $_GET[$string];
}
$enc = strip_tags(mysql_real_escape_string(htmlspecialchars(trim($rem)));
return $enc;
}