[CLUE-Tech] PHP escaping characters
    Jed S. Baer 
    thag at frii.com
       
    Fri Mar  1 18:23:53 MST 2002
    
    
  
On Fri, 01 Mar 2002 18:01:40 -0700
Steve Fry <clue at ir3w.com> wrote:
> Somewhere after you capture the variable - or before you output it
> (experiment with this) - use the tag called "stripslashes" like this:
> 
> Ex.  value=\"stripslashes($yourname)\"
> 
> http://www.php.net/manual/en/function.stripslashes.php
Thanks Steve.
Uh, one question though. I see here, and on the php.net site, that I'm
supposed to be able to embedd function calls in text. But when I try it,
the variable gets set to "stripslashes(Duncan O\'Malley)".
This is going to get really ugly if I have to do, e.g.:
$foo = " value=\"" . stripslashed($yourname) . "\"";
I note that the forms I've done using Perl/CGI don't have this problem. So
I wonder what it is PHP is thinking behind the scenes.
-- 
"Those who expect to reap the blessings of freedom must, like men,
 undergo the fatigue of supporting it."
 - Thomas Paine
    
    
More information about the clue-tech
mailing list