jwwceo Posted September 14, 2006 Share Posted September 14, 2006 I have a product in my database with an apostrophe. It works fine on the website, however, when I go to the edit product page, where there is a form to edit the product, the current value is supposed to be in the text field already. The only data being displayed in the text box is the info before the apostrophe. This is more of an annoyance, instead of a major problem, since this is only on the back end...but there must be a way around it... Link to comment https://forums.phpfreaks.com/topic/20786-apostrophe-in-phpmysql-syntax/ Share on other sites More sharing options...
effigy Posted September 14, 2006 Share Posted September 14, 2006 Try passing the value through htmlentities. Link to comment https://forums.phpfreaks.com/topic/20786-apostrophe-in-phpmysql-syntax/#findComment-92002 Share on other sites More sharing options...
Wintergreen Posted September 14, 2006 Share Posted September 14, 2006 Can you show the code you're using to display it? Link to comment https://forums.phpfreaks.com/topic/20786-apostrophe-in-phpmysql-syntax/#findComment-92004 Share on other sites More sharing options...
jwwceo Posted September 15, 2006 Author Share Posted September 15, 2006 This is what I'm trying to dispay on my page. The 'I'm huge in Japan" needs to be inside the form when the page loads so the user can edit it...but it just put the "I" in the text box..<INPUT TYPE='TEXT' NAME='name' class='cartForm' size=50 value='I'm Huge in Japan'></TD> Link to comment https://forums.phpfreaks.com/topic/20786-apostrophe-in-phpmysql-syntax/#findComment-92753 Share on other sites More sharing options...
kenrbnsn Posted September 15, 2006 Share Posted September 15, 2006 Use double quotes to surround your value. Ken Link to comment https://forums.phpfreaks.com/topic/20786-apostrophe-in-phpmysql-syntax/#findComment-92757 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.