Thread: ≈ php account.
View Single Post
Old 30.05.2005, 05:38   #21
BiGBoY
Архивный участник
 
Join Date: May 2005
Posts: 216
Default

Put this in ani injection part in functions.php

<?php
function antiinjection($str) {
$banwords = array ("'", ",", ";", "--", " or ", ")", "(", " OR ", " and ", " AND ","/n","/r");
if ( eregi ( "[a-zA-Z0-9]+", $str ) ) {
$str = str_replace ( $banwords, '', strtolower ( $str ) );
} else {
$str = NULL;
}
$str = trim($str);
$str = strip_tags($str);
$str = addslashes($str);
$str = htmlspecialchars($str);
return $str;
}
BiGBoY is offline