Possible Duplicate:
Best way to defend against mysql injection and cross site scripting
Validating user input?
I know that for mysql I can use > mysql_real_escape_string
but what can I use for php server side to maximally secure it from hacking ? Is there any ultimate way to do it ? If not please write all possible ways to minimize threat of hacking the site.