Re: escaped characters problem
| From: | David Newcomb | Date: | Tue, 20 Jun 2000 13:36:45 +0000 |
| Subject: | Re: escaped characters problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-515@lists.php.net to get a copy of this message | ||
Look at:
addslashes();
----- Original Message -----
From: Lez Lytollis <Lez.Lytollis@ccr.ntu.ac.uk>
To: PHP-db list <php-db@lists.php.net>
Sent: Monday, June 19, 2000 1:21 PM
Subject: [PHP-DB] escaped characters problem
> I have a written a simple news input interface for our admin staff to add
> articles to our website. When they have an article name containing a
single
> quote, the string is cut off at that point on generation of the sql
string.
>
> 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?
>
> Thanks in advance
>
> Lez
>
>
>
>
> --
> 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
>