RE: [PHP] " in data
| From: | Robert Sossomon | Date: | Fri, 18 Jun 2004 18:49:21 +0000 |
| Subject: | RE: [PHP] " in data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188605@lists.php.net to get a copy of this message | ||
I tried the "addslashes" on the pages and in combination of using "
to bring in the data to begin with, it works somewhat, where I am
running into a problem now is the 2nd time it pulls the data out (it
adds it back in with ") I am getting the same errors. I have tried
using the "addslashes" and when I view it IN the DB all I have are the
".
When I pull out the data again, I have a single " and it is not escaped,
though I have the addslashes working on it.
Do I need to post code or has this jarred someone's memory?
I guess I need to figure out how to read my $_POST[data] and parse that
to put in " because that seems to work, but not sure how to make
PHP do that.
Any thoughts?
Robert
-----Original Message-----
From: Torsten Roehr [mailto:roehr@zilleon.com]
Sent: Friday, June 18, 2004 1:40 PM
To: php-general@lists.php.net
Subject: Re: [PHP] " in data
>"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:C8F323573C030A448F3E5A2B6FE2070B03522644@nemesis...
>[snip]
>I have data with "something" in it and when I pull that data and dump
>it into an HTML form I am losing everything that is after the first " .
>Has anyone encountered this before, and have a way to patch it? [/snip]
>
>Yes, we have all encountered it. You need to escape the " character and
>other characters as well. Start here
>
>http://www.php.net/addslashes
>
>The manual is your friend
Another way is to convert the quotes to " because this is the
proper character for HTML output.
Regards, Torsten Roehr
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php