You are here: Re: [PHP] Php Problem Parsing or so I think « PHP « IT news, forums, messages
Re: [PHP] Php Problem Parsing or so I think

Posted by Curt Zirzow on 02/06/05 21:00

* Thus wrote Carinus Carelse:
> variables I get an error message in the browser Illegitimate format. I
> am including a copy of the link I click on to call the page below. I
> wonder if someone on the list can may be help me. Have I compiled PHP
> wrong or is the code itself wrong. Or is there a better way to do the
> below.
>
> http://localhost.domain.com/mailrelease/Release.php?id=1CwdBD-0002z8-1K&date=20050203&name=user@domain.com
>
> <html>
> <head>
> <title> Releasing <?php echo($_GET['id']); ?> to all recipients </title>
>
> <body>
> <p> Releasing email message <b> <?php echo($_GET['id']); ?> </b> to <b>
> <?php echo ($HTTP_GET_VARS['name']); ?> </b>
> </p>
> <?php
>
> $file = $_GET['id'];
> $date = $_GET['date'];
> $name = $_GET['name'];
> if(preg_match("/^[a-zA-Z0-9]+$/",$file)
> && preg_match("/^[0-9]+$/",$date)
> && preg_match("/^[a-zA-Z0-9\_\.\-]+@[a-zA-Z0-9\.\-]+$/",$name))
>
> {

The $file expression is ignoring -'s, use:

if(preg_match("/^[a-zA-Z0-9-]+$/",$file)


Curt
--
Quoth the Raven, "Nevermore."

 

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

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