phpbeginner Posted May 24, 2007 Share Posted May 24, 2007 I have a form where I add a lot of ' and " for feet and inches into MYSql and most of this works fine except when I go back to the Edit/Delete Form. It stores the ' and " in the database, reads and outputs the ' and " on my page but when I use the edit/delete form it cuts off at the '. Is there a simple solution to this on an edit/delete form ? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/52796-edit-delete-form-and-quotations/ Share on other sites More sharing options...
AndieB Posted May 24, 2007 Share Posted May 24, 2007 Have you tried stripslashes() function? Quote Link to comment https://forums.phpfreaks.com/topic/52796-edit-delete-form-and-quotations/#findComment-260662 Share on other sites More sharing options...
phpbeginner Posted May 24, 2007 Author Share Posted May 24, 2007 When using the form to insert a new record it updates my database as it should with the ' and ". It also reads correctly onto my page but cuts off at the ' on my edit delete form. I am not using addslashes when updating my database as it is updating and outputting all the ' and " with the exception of my edit form. So are you saying I need to use addslashes on all of my update forms and then stripslashes to get this to work on the edit form ? Quote Link to comment https://forums.phpfreaks.com/topic/52796-edit-delete-form-and-quotations/#findComment-260673 Share on other sites More sharing options...
AJReading Posted May 24, 2007 Share Posted May 24, 2007 just use addslashes() for all your input before storing it in the database. Then use stripslashes() each time you display it. You shouldnt have any problems if you do that Quote Link to comment https://forums.phpfreaks.com/topic/52796-edit-delete-form-and-quotations/#findComment-260694 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.