|
Posted by MS on 09/28/85 11:49
> Try adding this before the last closing parethesis above:
> !== false
I tried this with no better results...
But i did figure out what was going on....
if(eregi("^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\
..)|(([ a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", $email)){
// In here was a redirect function... the redirect was being called but the
script after this "if" was continuing to be processed.
Redirect(page.php);
// Adding the Die(); here stopped the script.
die();
}
Thanks for your help !!
--
----------------------------------------------------------------------------
http://www.myclubweb.co.uk - The Home of Club Websites
----------------------------------------------------------------------------
"Kim Andrι Akerψ" <kimandre@NOSPAMbetadome.com> wrote in message
news:4e8cplF1dbrjqU1@individual.net...
> MS wrote:
>
> > I know this seems simple, but I am totally confused with the following
> >
> > if(eregi("^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\
> > .)|(([ a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", $email)){
> > ....
> > }
> >
> > it supposedly check for a valid email format !!
> > But I am getting the impression that this check is not being
> > completed.
> >
> > it makes no difference what the value of $email is I cannot get the
> > expression to be True !!
> >
> > What am I doing Wrong?
>
> Trouble with using ereg() and eregi(), that they return the index
> position of the string found, which can be 0, which also can evaluate
> as false in an if() statement.
>
> Try adding this before the last closing parethesis above:
> !== false
>
> This will make sure that if the string is a valid e-mail adress, the
> if-statement will return true. The extra = sign makes sure that "false"
> will match on type (boolean) as well as value.
>
> --
> Kim Andrι Akerψ
> - kimandre@NOSPAMbetadome.com
> (remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|