Re: htmlentities
| From: | Jason Wong | Date: | Sat, 06 Apr 2002 11:14:25 +0000 |
| Subject: | Re: htmlentities | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91855@lists.php.net to get a copy of this message | ||
On Saturday 06 April 2002 18:34, Joerg Hanke [ML-php] wrote:
> hi!
>
> i've got the following problem and hope one of you is able to help me
> solving that:
>
> i've got a system in php that writes data (e.g. variable-name = $data)
> to a mysql database. there are two more scripts: one for displaying the
> data and one for writing the data into a formular. the displaying-script
> includes a link to the formular-script which submits the values for
> $data. i use the command 'htmlentities' to express the value (there is
> an html-tag like <img src="http:...">)
> correctly. when the
> formular-script is executed via this link i get a wrong result: <img
> src=\"....\"> there are these backslashes...
>
>
> what 2 do??
You most likely have "magic_quotes_runtime" enabled in php.ini. Either
disable it or use stripslashes() on the data you retrieve from the db.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Loan-department manager: "There isn't any fine print. At these
interest rates, we don't need it."
*/