how do icheck that an email
Moderator: General Moderators
- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
how do icheck that an email
that i have recived is a valid one?
I think he means validate an email address
blah@blah.com - validated = yes
blf&*^&@asdas - validated = no
Mark
blah@blah.com - validated = yes
blf&*^&@asdas - validated = no
Mark
Ah, but:
Matt@hsmx.com = valid
Batt@hsmx.com = invalid
The only way you can ever really know is to send the user an email with information in it.
Matt@hsmx.com = valid
Batt@hsmx.com = invalid
The only way you can ever really know is to send the user an email with information in it.
Yup, i know.
The question was not well contructed in the first place by pelegk2.
Please can you read THIS and make your questions clear and concise. It makes everyones life easier.
Mark
The question was not well contructed in the first place by pelegk2.
Please can you read THIS and make your questions clear and concise. It makes everyones life easier.
Mark
look in the code snipplets. heres one, not tested but looks good. quck throw-together. As mark said, u could google for this and find it alot quicker then typing a reply 
this allows for a match of a-z, either cap or not. number 0-9 or _ or - followed by an @ sign, the sequence is repeated, the {2,4} makes sure a .com, .au, etc. would need modified for co.uk endings
none the less, it looks good n should work
Code: Select all
<?php
preg_match('/^їA-z0-9_\-]+ї@]їA-z0-9_\-]+(ї.]їA-z0-9_\-]+)+їA-z]{2,4}$/', $emailaddress);
?>none the less, it looks good n should work