note 14556 added to function.stripslashes.php

From: Date: Fri, 03 Aug 2001 19:00:12 +0000
Subject: note 14556 added to function.stripslashes.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16295@lists.php.net to get a copy of this message
While this might be obvious to you PHP gurus, it was not immediately obvious to a newbie like myself. I have a form that writes to a text file; said text file is viewed on another page (it's a very simple "guest book" type of thing). I noticed that apostrophes (') were being escaped in the view file, as in: "If this doesn\'t work I\'ll eat my hat." It took some digging to find the simplest form of stripslashes() works to remove those, as long as it's used in the following format: $myformdata = stripslashes($formdata); where "$formdata" is the name of the text field being submitted from the form. I hope this helps another newbie (and maybe some of you advanced folks as well!) :-) -Bob http://www.php.net/manual/en/function.stripslashes.php

« previous php.notes (#16295) next »