You'll want to make sure any user provided inputs that get used in SQL queries are escaped using the PHP function mysql_real_escape_string
and if you are letting people submit text to run htmlentities
on the provided text so XXS isn't possible. If possible, white-list user provided input and discard anything else
This is just touching the surface of what you can do but look into query escaping and preventing cross site scripting.