|
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."
[Back to original message]
|