Re: my bugaboo.

From: Date: Sun, 11 Feb 2001 00:01:30 +0000
Subject: Re: my bugaboo.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-39100@lists.php.net to get a copy of this message
Look into addslashes() and stripslashes() Are you getting $text from a database query? - Shane DISCLAIMER: I am by no means an expert on this, or any other, topic... ----- Original Message ----- From: "Floyd Baker" <fbaker@olm1.com> To: "Floyd Baker" <fbaker@olm1.com> Cc: <php-general@lists.php.net> Sent: Saturday, February 10, 2001 1:39 PM Subject: Re: [PHP] my bugaboo. > > Hello and thanks to all for the help on the magic quotes, etc. > It gives me a better handle on what I'm dealing with. > > Except for one more thing. > > When I bring back text from a field which contains a ', and try to apply it as > the value of an input box, it still truncates in the box. > > When I simply print $text, it prints out correctly as *Don't do this* . > When I make $text the default value of an input box, it shows as *Don*. > > If the slash is still in place, it reads *Don\'t* above the box and *Don\* in > the box. > > My bugaboo continues.. :-> > > Thanks again for any further advice. > > Floyd > > > > > > > > On Sat, 03 Feb 2001 19:42:23 -0500, you wrote: > > > > >Hi.. > > > >I have a routine where we input text to fields. When there is an apostrophe it > >handles it correctly. When the form is brought back for editing, the field > >values show up in the input fields, with all apostrophes intact, just as it > >should be. > > > >When I upload this script to my isp, it doesn't work.. The apostrophes truncate > >the rest of the text. 'Don't cry over spilled milk', in a field, turns into > >'Don'... > > > >I have php4 mod in my win32 devbox. The isp is php3. Is this the problem? > >What is the best way out of it please? > > > >Thanks in advance. > > > >Floyd > > > > > >-- > > -- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#39100) next »