See this site from pixel 2 depth looks pretty good.
heres a little snippet ill donate that I use for my Forum software to protect all SQL Injection from leaking.
PHP Code:
<?php
//copy righted Des PC Industries
http://projects.nevux.info/index.html//or PCindustries.visionstyles.info
function no_injection($string){
$string = striptags($string);
$string = htmlspecialchars($string);
$string = trim($string);
$string = stripslashes($string);
$string = mysql_real_escape_string($string);
return $string;
}
function hiddenkey($pass){
$pass = striptags($pass);
$pass = htmlspecialchars($pass);
$pass = trim($pass);
$pass = stripslashes($pass);
$pass = mysql_real_escape_string($pass);
$pass = md5($pass);
return $pass;
}
?>
Above stops sql injection and second function makes password encrpyted
example:
PHP Code:
$password = hiddenkey($password);
$username = no_injection($username);
you could also do
PHP Code:
<?php
//you must include functions for any of this to work;)
hiddenkey($_POST['password'];
no_injection($_POST['username'];
?>
Have fun