Reputation: 1
I'm using zend frame work zend form and zend db for my project.
The problem I have is, when the user enter some special characters in the text field (i.e "I'm"), it is saved in the database with the "\" character (i.e. "I\'"). I need to know how to fix this so it just saved as whatever the user entered.
Upvotes: 0
Views: 780
Reputation: 710
Use stripslashes(trim($value));
to strip the \
and remove the extra spaces.
Upvotes: 0
Reputation: 12843
http://www.php.net/manual/en/security.magicquotes.disabling.php
If you cannot for any reason disable them you can use stripslashes to strip those \ when getitng the data out of the db before echoing it to the browser.
Upvotes: 0