Re: Problem with special characters
| From: | Kodrik | Date: | Thu, 08 Nov 2001 17:12:59 +0000 |
| Subject: | Re: Problem with special characters | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14152@lists.php.net to get a copy of this message | ||
Check out the rows in your database to see their actual content.
It seems your problem was on insert or before.
Use phpmyadmin, it is free and great for beginners as well of advanced users.
Also, it might be faster and easier for you to write your variables in
thecode this way where you can:
echo ("<td width='50%'><input type='text'
name='name$rownum'
> size='46' value='" . $queryRow[name] . '></td>");
use single quotes so you don't have to escape and just type the variable
within your double quotes when possible.
But this doesn't affect the output so it won't help solving your problem.
> 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