Re: Anyone? more info...

From: Date: Tue, 11 Feb 2003 01:50:48 +0000
Subject: Re: Anyone? more info...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-135144@lists.php.net to get a copy of this message
Thanks Phillip! "Philip Hallstrom" <philip@adhesivemedia.com> wrote in message news:20030210160245.N61180-100000@cypress.adhesivemedia.com... > That is the right answer though... along with the various magic_quotes > flags in the configuration. > > You need to look at your existing settings and then create a simple test > where you type in something such as: x'x"x\x and then spit it out and save > it and generally see at what point slashes are being added. > > There's a couple of ways to do it... > > put slashes in automatically, strip them on display > don't do it automatically, add them before insertion to a database > > but which one is easiest for you depends on your sites configuration and > what code you've already written, etc... > > -philip > > > On Mon, 10 Feb 2003, Shawn McKenzie wrote: > > > Is more info needed, or was everyone just going post replies like: > > > > "see stripslashes() and htmlentities()" > > > > ******************************************************* > > > > I have a form and I want the user to be able to enter html in a text area. > > This will then be stored in an array in a config file. Example > > $htmlstuff[1] = '<script type="text/javascript>some stuff here</script>'; > > > > When they visit the form again it will display as they entered it and they > > can modify it and save it back to the array. The problem is I keep getting > > multiple \ on the single and double quotes every time they submit the form, > > as well as multiple newlines and trailing spaces. > > > > I have looked at and tried combinations of stripslashes(), > > htmlspecialchars() and htmlentities(), so I don't need a link to the PHP > > manual. I can't find the right combination and don't know when to do what > > to get this to work. Can anyone give me a good example? > > > > Serious help appreciated... > > > > Thanks! > > -Shawn > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.general (#135144) next »