Admin !!!!1 He Kill Me And Stole My Bok !!!! Help !!

Junior Spellweaver
Joined
Oct 13, 2006
Messages
141
Reaction score
0
Location
Singapore
PHP Code:
// Anti-SQL Injection
function check_inject()
{
$badchars = array(";", "'", "\"", "*", "DROP", "SELECT", "UPDATE", "DELETE", "-");

foreach(
$_POST as $value)
{
if(
in_array($value, $badchars))
{
die(
"SQL Injection Detected\n<br />\nIP: ".$_SERVER['REMOTE_ADDR']);
**
else
{
$check = preg_split("//", $value, -1, PREG_SPLIT_OFFSET_CAPTURE);
foreach(
$check as $char)
{
if(
in_array($char, $badchars))
{
die(
"SQL Injection Detected\n<br />\nIP: ".$_SERVER['REMOTE_ADDR']);
**
**
**
**
**
 
Back