JAGF - Just A General Forum

It is currently Jan 6th, '09, 12:19 • All times are UTC + 1 hour






Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: [php][webdesign][2]Check if input = email
PostPosted: Nov 1st, '08, 20:15 
Offline
New Gamer

Joined: Oct 31st, '08, 14:28
Posts: 42
Highscores: 24
How did you find this forum?: x10 forums
To check if what people put in a input box is really a email
you need this for register system because you usually have a input field for user to put in how to contact and usually email

function isValidEmail($email = '')
{
return preg_match("/^[\d\w\/+!=#|$?%{^&}*`'~-][\d\w\/\.+!=#|$?%{^&}*`'~-]*@[A-Z0-9][A-Z0-9.-]{1,61}[A-Z0-9]\.[A-Z]{2,6}$/ix",$email);
}

This will check to see if it is valid or not. Checking it is important because when you use a forums or something you need to make sure it is a e-mail, of course people can put in false email but this check if it is in email form like person@something.com
_________________
Image


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.

Design by phpBB 3 Skins & Forum Hosting | Modded by ExchangeCore

CSS Template by RamblingSoul | Sponsored By Bargain Finder