Re: Problem with special characters
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Problem with special characters | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14146@lists.php.net to get a copy of this message | ||
* How exactly are you inserting the data? - show us the SQL you used.
* How exactly are you pulling the data out - show us more SQL!!
At first glance it seems as if it may be soething to do with whatever you use in your SQL
'WHERE'
clause.
SO maybe using "SELECT foo FROM bar WHERE foo='$bar' ORDER BY '$bar'";
is what you need??
Cheers
Russ
On Thu, 8 Nov 2001 11:14:11 -0500 Don <don@lclcan.com> wrote:
> 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
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: r.j.michell@apu.ac.uk
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#