From: "W.D." <[EMAIL PROTECTED]>
> Actually I tried a variation of what you gave me before and it didnt work.
I
> couldnt get yours to validate thanks. heres what I used
> <?php
> if (getenv("REQUEST_METHOD") == "POST")
> {
> if (
> eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,3}$", $Email)
> && eregi("^[a-z0-9]$", $FirstName)
> && eregi("^[a-z0-9]$", $LastName)
> )
> {
> echo "thanks";
> }
> else
> {
> echo "error!";
> }
> }
> ?>
>
> This is directly after the form using the registered vars $Email,
> $FirstName, $LastName. So I dunno whats wrong..
>
Your regular expressions are incorrect.
Try:
if (
eregi("^[a-z0-9\._-]+@[a-z0-9\.-]+\.[a-z]{2,3}$", $Email)
&& eregi("^[a-z0-9]+$", $FirstName)
&& eregi("^[a-z0-9]+$", $LastName)
)
Cheers
Simon Garner
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]