jacklany Posted January 31, 2008 Share Posted January 31, 2008 Hi all. So i'm trying to add, delete and update fields from a database using forms and textfields. My code works, except when there are apostrophes (') in the textfields. I suppose it conflicts with the apostrophes in the mysql_query command. Any ideas what my problem is? thanks for sharing opinions. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted January 31, 2008 Share Posted January 31, 2008 Use the function mysql_real_escape_string() on the values when you insert/update the database. Ken Quote Link to comment Share on other sites More sharing options...
jacklany Posted January 31, 2008 Author Share Posted January 31, 2008 So simple! It works. Thanks a lot and sorry for asking a question you've seen a thousand times. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.