When you execute a SQL query, you have to clean your strings or users can execute malicious SQL on your website.
I usually just have a function escape_string(blah),
the MySQL C API has it's own mysql_escape_string(). Using it or it's equivalent would be best.
mysql_escape_string()