Reply to Re: Backslashes from textbox forms are returned as double-backslashes. Why?

Your name:

Reply:


Posted by Kimmo Laine on 06/12/06 12:46

"wylbur37" <wylbur37nospam@yahoo.com> wrote in message
news:1150116106.703791.228640@c74g2000cwc.googlegroups.com...
> When using a form with an input textbox such as the following ...
>
> <input type="text" name="field1" size=30>
>
> I discovered that when a backslash (\) is typed into the textbox,
> when I later check the value (in $field1), I get *two* backslashes.
> For example, If I type ...
>
> c:\abc\xyz
>
> the $field1 variable will then have a value of ...
>
> c:\\abc\\xyz
>
> Why does this happen?


Read These From Manual:

http://php.net/manual/en/security.magicquotes.php
When on, all ' (single-quote), " (double quote), \ (backslash) and NULL
characters are escaped with a backslash automatically.

http://php.net/manual/en/function.stripslashes.php
Returns a string with backslashes stripped off. (\' becomes ' and so on.)
Double backslashes (\\) are made into a single backslash (\).

--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)

[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

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