mikefrederick Posted April 10, 2008 Share Posted April 10, 2008 when i enter an apostrophe into an input form it comes out with 3 slashes before it. i know i can escape the slashes afterwards, but is there a way to enter them in a way that will allow get rid of the slashes before they are sent away? Link to comment https://forums.phpfreaks.com/topic/100430-apostrophes-and-slashes-but-not-stripping/ Share on other sites More sharing options...
roopurt18 Posted April 10, 2008 Share Posted April 10, 2008 Read the manual about Magic Quotes. Link to comment https://forums.phpfreaks.com/topic/100430-apostrophes-and-slashes-but-not-stripping/#findComment-513592 Share on other sites More sharing options...
mikefrederick Posted April 10, 2008 Author Share Posted April 10, 2008 i read it, in other words theres no way to do so without turning that off? Link to comment https://forums.phpfreaks.com/topic/100430-apostrophes-and-slashes-but-not-stripping/#findComment-513595 Share on other sites More sharing options...
roopurt18 Posted April 10, 2008 Share Posted April 10, 2008 You can write a function that removes them at the beginning of the script before you do anything with the values. For one such function (which happens to be the top-most comment in the Magic Quotes documentation): http://talks.php.net/show/php-best-practices/26 It helps to view that page with CSS disabled. Link to comment https://forums.phpfreaks.com/topic/100430-apostrophes-and-slashes-but-not-stripping/#findComment-513597 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.