I have a form into which the visitor can enter data, and I want to store this data in a mysql database via the $_POST variable. What do I need to prevent sql injection?
Have a read at this, and next time do some searching:
https://stackoverflow.com/questions/1973/what-is-the-best-way-to-avoid-sql-injection-attacks