- Joined
- Jul 8, 2013
- Messages
- 58
- Reaction score
- 7
Hello RaGEZONE!
I've coded one anti sql injection, but i dont know if it will make me protected what do you guys think anyways?
All the best,
Paul.
I've coded one anti sql injection, but i dont know if it will make me protected what do you guys think anyways?
PHP:
function clean($value)
{
$check = $value;
$value = str_replace("'", "''", $value);
if($check != $value)
{
$logf = fopen("secure/sqlattacks.log", "a+");
fprintf($logf, "Date : %s IP : %s Code : %s, Fixed Code : %s\r\n", Date : date("d-m-Y h:i:s A"), IP : $_SERVER['REMOTE_ADDR'], $check, $value);
fclose($logf);
header("Location: index.php");
}
return($value);
}
All the best,
Paul.

