envexlabs Posted August 16, 2007 Share Posted August 16, 2007 Hey, Anywere on the site where I can add my description to an item or a store - whenever I type an apostrophe it comes up with an error. Eg. It’s a sale! will become: It\’s a sale! How do i go about fixing this? Thanks, envex Quote Link to comment https://forums.phpfreaks.com/topic/65270-input-boxes-and-wierd-happenings/ Share on other sites More sharing options...
lemmin Posted August 16, 2007 Share Posted August 16, 2007 This is because of some kind of cleaning function you are using before querying the database. It looks for characters like that and puts a slash in front to tell the query that it is to use the actual character, not the syntax. It should still output the right character. One issue may be that you are using a funny character for apostrophe. I see ’ which is different than '. Maybe \’ isn't recognized by your database as a character (or syntax) so it is just the literl string. You could fix this by taking the check for that character out of the cleaning function or just using the normal apostrophe character. Try both and see what happens. Quote Link to comment https://forums.phpfreaks.com/topic/65270-input-boxes-and-wierd-happenings/#findComment-325921 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.