You are here: Re: [PHP] Issues with backslashes and GET data « PHP « IT news, forums, messages
Re: [PHP] Issues with backslashes and GET data

Posted by Brent Baisley on 10/12/05 15:22

Have you tried the stripslashes() function? That will "unescape"
characters that have been escaped.

On Oct 12, 2005, at 8:03 AM, Martin Selway wrote:

> I use a php page which is supposed to return records from a
> database table limited to the servername specicified in a drop down
> menu.
> A servername may contain a backslash e.g. Server1\SQL1.
> When this data is returned from the URL e.g. $server = $_GET
> ['server'];
> The name is returned as Server1\\SQL1, so the search fails.
>
> I've tried using a regular expression to remove one of the
> backslashes:
> $server = ereg_replace("\\", "\", $server);
> but I can't get this to work either.
>
> Any suggestions welcome, I'm running out of ideas.
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

 

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

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