Re: Php Problem Parsing or so I think

From: Date: Sun, 06 Feb 2005 19:00:28 +0000
Subject: Re: Php Problem Parsing or so I think
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-208151@lists.php.net to get a copy of this message
* 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."

« previous php.general (#208151) next »