Reply to Re: Backslashes all other the place

Your name:

Reply:


Posted by Erwin Moller on 10/24/06 14:09

James54321 wrote:

> Ok so this is the text i type into the database:
>
> this is some 'example text' and is a "test"
>
> and this is what is displayed when its in the database:
>
> this is some \'example text\' and is a \"test\"
>
> is there anyway to stop that? or hide the backslahes?
>
> Thanks, James.

Hi James,

Your question is too vague to give a sensible answer.
What do you mean by 'type into database'?
Do you type directly into the database or do you use a html-form with PHP at
the backend inserting/updating the database?

If the latter, are you sure the backslashes are actually IN the database, or
do you see some output somewhere on a webpage that contains them?
Check this by direct querying the database from commandline. It is very well
possible they are added by PHP, and are stored just fine in the database.

I am not teasing you: The backslashmatter is very important to understand
for a programmer, because it protects against crackattacks like
SQL-injection.

Read more here:
http://nl2.php.net/manual/en/function.addslashes.php

Be sure to follow the links to:
stripslashes(), htmlspecialchars(), and get_magic_quotes_gpc().

Regards,
Erwin Moller

[Back to original 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

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