Posted by Pedro Graca on 11/17/06 23:17
gzerphey wrote:
> I have a bit of a problem with MySQL and PHP working together. More
> specifically when i use htmlspecialchars() to encode my text then load
> it into the database, it is interpreting the special characters and
> decoding them.
>
> Is there any way that I can perserve this coding and make sure it says
> in my database?
>
> Example:
>
> Here is what is entered -- t%20t
> Here is what is showing in the database now -- t t
> here is what I would like to see -- t%20t
What happens when you add this line right at the top of your script,
at line 1?
<?php header('Content-Type: text/plain'); ?>
--
I (almost) never check the dodgeit address.
If you *really* need to mail me, use the address in the Reply-To
header with a message in *plain* *text* *without* *attachments*.
[Back to original message]
|