plz i want to ask how to avoid sql injection as when i make a text field and user enter a data i want to be sure that my script is secure it is a script that read from a database and write in other database user can register i am afraid any hacker do any hacking -------- so question is how to make user enter data and i am sure it will not make any injection i heard that there is functions as addslashes and strip slashes can u help me in how to use them? or by any other thing for security?
strip tags is actually unnecessary. With SQL injections it's as simple as applying mysql_real_escape_string before passing the data to the query
http://kzzen.com/2008-10-protect-your-website-against-rfi-attack-and-sql-injection.html#sql_injection