$_POST = array_map("mysql_real_escape_string",$_POST);
bu kodu

require_once("baglan.php");
bunun altına ekleyip dener misin?