RE: [PHP-DB] Problem with special characters
| From: | NCI/IMS) | Date: | Thu, 08 Nov 2001 16:27:59 +0000 |
| Subject: | RE: [PHP-DB] Problem with special characters | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14149@lists.php.net to get a copy of this message | ||
I would recommend that you try something like str_replace and replace all of
the double quotes with nothing. You'll probably need to put a slash in
front of the quote in there, but I think it should work.
Good luck!
-Natalie
> -----Original Message-----
> From: Don [SMTP:don@lclcan.com]
> Sent: Thursday, November 08, 2001 11:14 AM
> To: php-db list
> Subject: [PHP-DB] Problem with special characters
>
> Hi,
>
> I have a mysql database that contains various data. I am using PHP to
> pull out the data and display it within a HTML form. I am having trouble
> with certain data that contains escaped characters.
>
> Example: field contains --> mr "John Smith"
>
> My PHP code is:
> echo "<td width=\"50%\"><input type=\"text\"
> name=\"name" . $rownum . "\"
> size=\"46\" value=\"" . $queryRow[name] .
> "\"></td>";
>
> The result displayed is --> mr
>
> What happened to "John Smith" ???
>
> I have tried the functions stripslashes and addslashes but still no luck.
>
> Can anyone help?
>
> Thanks,
> Don