You are here: Re: PHP and MySql « PHP Programming Language « IT news, forums, messages
Re: PHP and MySql

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*.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация