PHP 5 magic quotes turned off? Feb24 '06
I noticed, this morning, that a comment submitted at this site, with a single quote (') was not going through, even though it’s been fine, in the past.
I then realized that I changed my server PHP settings to support PHP 5, about two days ago. I guess this is the first noticeable "bug."
I am assuming that PHP 5 does not support the oft-controversial Magic Quotes feature, whereas previous version do.
Actually, let me correct myself... PHP 5 doesn’t have Magic Quotes turned on automatically. I am guessing it can easily be enabled, but now that it’s not, perhaps I should consider a better implementation for dealing with quotes in forms.
Developers out there, how do you deal with quotes submitted from forms?
Categories: PHP ![]()
Add Feedback (view all)
Leave feedback
You should never, ever need to use stripslashes. Make sure you have used addslashes or mysqlrealescape_string before you try to insert tex ... Read more.
matthom
is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from a suburb of Chicago.
Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.
Popular Pages
- Fast rounded corners in Photoshop (4156 recent visits)
- PHP – passing variables across pages (1560 recent visits)
- JavaScript set selected on load (1291 recent visits)
- Removing all child nodes from an element (882 recent visits)
- iPod songs out of order? (747 recent visits)
- Britney - Everytime piano tab (671 recent visits)
- Firefox 3 smart address bar: wildcard search (633 recent visits)
- MySQL LEFT JOIN syntax (544 recent visits)
- Breathe Me - Sia (510 recent visits)
- Tumblr: how blogging should be (405 recent visits)
Similar Entries
- PHP: Skipping index page call in URL (20 recent visits)
- PHP project: convert times to numbers (55 recent visits)
- PHP – passing variables across pages (1560 recent visits)
- Install Apache, PHP, MySQL on Windows (17 recent visits)
- Code mnemonics: PHP implode/explode (56 recent visits)
- Swap banner image with CSS and PHP (117 recent visits)
Stats
22 unique visits since August 2008
Recent Referrers (click)
- php5 automatically add slashes
- php5 disable magic quote
- php5 magic quotes off
- how to turn off magic quotes
- how to turn off magic quotes php mysql
- php magic quotes
- turn on php magic quotes
- How to Turn Off Magic Quotes
- turn off magic quotes
- php magic quotes
- magic quotes+php should i turn off
- php5 magic quotes
- magic quotes php 5
- php5 Magic Quotes disable
- php5 magic quotes
- php5 magic-quotes
- php5 Magic Quotes
- php turn off magic quotes
- php magic quotes 5.0
By using addslashes and stripslashes: Addslashes on form values before saving and then stripslashes before you output to browser. V ... Read more.