GetDotted Domains

Viewing Thread:
"E-Mail Validation Script"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 28/08/02 at 09:32
Regular
Posts: 787
I got my first form submitting this week but I still need to get an E-mail Vlidation script working. Here's the one I'm currently using:



Obviously I don't need to say the form should be called form1 ect. But it doesn't work at all. Can anybody spot what's wrong with it?
Thanks in advance
Rickoss
Mon 02/09/02 at 16:14
Posts: 0
Nimco wrote:
> Here ya go:
>
> > function is_email($email) {
> if(eregi("^[a-z0-9\._-]+@+[a-z0-9\._-] +\.+[a-z]{2,3}$",
> $email)) return TRUE;
> else return FALSE;
> }
> ?>
>
> There is a space in there so you may as well remove it....
Mon 02/09/02 at 01:32
Regular
"Eff, you see, kay?"
Posts: 14,156
+--={01:30:41}=--
| rob@euripides:~$ php4

echo is_email("foobalh");

echo is_email("[email protected]");
?>


Fatal error: Call to undefined function: is_email() in - on line 3
+--={01:30:52}=--
| rob@euripides:~$
Mon 02/09/02 at 01:12
Regular
"It goes so quickly"
Posts: 4,083
is the 'is_email()' an actual function in PHP????????

I never know that was there.

That PHP Script I send you RiCkOsS, I could add that is_email() to it easily enough, if you managed to get the other one working?
Sat 31/08/02 at 15:10
Posts: 0
Fair enough
Sat 31/08/02 at 13:55
Regular
Posts: 10,437
I'll just stick with the JS script. I understans JS more so if something goes wrong I might be able to fix it.

Cheers for the help people.
Sat 31/08/02 at 13:39
Posts: 0
RiCkOsS wrote:
> Would that be if the text feild for your email was called email?

No, you would use it something like this:

------


if (is_email($txt2)) { echo "Well done! Valid email address!"; }
else { echo "Sorry, you entered an incorrect email address."; }

?>
Sat 31/08/02 at 13:32
Regular
Posts: 10,437
Would that be if the text feild for your email was called email?
Sat 31/08/02 at 13:24
Posts: 0
Here ya go:

function is_email($email) {
if(eregi("^[a-z0-9\._-]+@+[a-z0-9\._-] +\.+[a-z]{2,3}$", $email)) return TRUE;
else return FALSE;
}
?>

There is a space in there so you may as well remove it....
Sat 31/08/02 at 13:20
Regular
Posts: 10,437
Woohooo! Thanks Nimco, working fine now. Finally I won't be getting e-mails from 'breast' anymore :-D
Sat 31/08/02 at 13:10
Regular
Posts: 10,437
Cheers Nimco. If a PHP script would be better would it be anything like this:

if (!eregi ("^([a-z0-9]|\\-|\\.) (space) +@(([a-z0-9]|\\-)+\\.)+[a-z]{2,4}$", $txt2))
die("E-Mail Address Incorrect");
?>

Just want to know, because I like that script :-)

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Wonderful...
... and so easy-to-use even for a technophobe like me. I had my website up in a couple of hours. Thank you.
Vivien
Everybody thinks I am an IT genius...
Nothing but admiration. I have been complimented on the church site that I manage through you and everybody thinks I am an IT genius. Your support is unquestionably outstanding.
Brian

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.