Re: [spam score 3.92/10.0 -pobox] Re: [PHP-DB] escaped characters problem
| From: | Morten Dreier | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: [spam score 3.92/10.0 -pobox] Re: [PHP-DB] escaped characters problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-472@lists.php.net to get a copy of this message | ||
On Mon, 19 Jun 2000, Lez Lytollis wrote:
>
>
>
> > use the functin htmlspecialchars()
> >
>
> I tried adding
> $description = htmlspecialchars($description) but I now get
> a value of Lez\\ in $strsql
what if you use htmlspecialchars($description) instead of adding the \ ?
> > > example
> > > ---------
> > >
> > > original typed entry in description field: Lez's quote test
> > > echoed $description value: Lez\'s quote test
> > > $strsql = "INSERT INTO news (description) VALUES ( '$description'
> > > )";
> > > echoed $strsql value: Lez\
> > >
> > > Can anyone tell me what is going on and how I can fix it?
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
--
Morten Dreier
Institutt for Datateknikk og Informasjonsvitenskap
http://www.ifi.ntnu.no/~mdreier/