Re: Double quotes in form fields and submitting them

From: Date: Sun, 24 Mar 2002 01:03:17 +0000
Subject: Re: Double quotes in form fields and submitting them
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89879@lists.php.net to get a copy of this message
That's a little odd; something else must be going on. Can you provide some more code, and, preferably, a pointer to a live example? miguel On Sat, 23 Mar 2002, webapprentice wrote: > Hi, > "foobar" becomes simply \ > > I've lost foobar AND the double quotes. Is there a way to keep them all? > > --Stephen > > ----- Original Message ----- > From: "Miguel Cruz" <mnc@stoic.net> > To: "webapprentice" <webapprentice@onemain.com> > Cc: <php-general@lists.php.net> > Sent: Saturday, March 23, 2002 7:49 PM > Subject: Re: [PHP] Double quotes in form fields and submitting them > > > > On Fri, 22 Mar 2002, webapprentice wrote: > > > I have a form with a text field, say userName. > > > I put a value in that has double quotes (i.e. "foobar") and submit this > form. > > > > > > On output I have this: > > > <?php echo $HTTP_POST_VARS["userName"]; ?> > > > > > > The output ends up being a \. > > > > The quotes go away, or they just get a backslash before them? If the > > latter, try <?= stripslashes($HTTP_POST_VARS['userName']) ?> > > > > miguel > > > >

« previous php.general (#89879) next »