tsoltysiak Posted February 5, 2010 Share Posted February 5, 2010 Hi, I have a simple POST form to insert a new entry to my mysql database using php. It works fine with normal text, but if in the input there is a " or ', it can't add it (it. How do I get the php to ignore the quotes and apostrophes from the inputs? I tried putting a \ before the quote in the input field, but it just adds up to the backslash into the database, and messes up once it reaches the quotation. Thanks for your help, Tom Link to comment https://forums.phpfreaks.com/topic/191026-quotation-or-apostrophe-in-text-input-i-cant-store-it-in-my-database/ Share on other sites More sharing options...
scotmcc Posted February 5, 2010 Share Posted February 5, 2010 mysql_real_escape_string See: http://us.php.net/manual/en/function.mysql-real-escape-string.php Link to comment https://forums.phpfreaks.com/topic/191026-quotation-or-apostrophe-in-text-input-i-cant-store-it-in-my-database/#findComment-1007262 Share on other sites More sharing options...
tsoltysiak Posted February 5, 2010 Author Share Posted February 5, 2010 Thanks, that's exactly what I needed. Link to comment https://forums.phpfreaks.com/topic/191026-quotation-or-apostrophe-in-text-input-i-cant-store-it-in-my-database/#findComment-1007272 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.