Amoraboti - Program
Rashed - Uz - Zaman (Rasel)
  Home About Me Brainstorming Facebook Fan Page Contact    
  Author
I'm Rz Rasel
From Bangladesh

  Archives
April 2010
May 2010
January 2011
February 2011
January 2012
February 2012
March 2012

  Current

  Previous Posts
How To Insert Unicode Values To MySQL Using Java
Multiple Checkbox Select/Deselect JavaScript And j...
Dynamically Add/Remove rows in HTML table using Ja...
Dynamically add button, textbox, input, radio elem...
Changing Form Input (Textbox) Style on Focus using...
Duration Calculator Between Two Dates
Get Cursore Position In JavaScript
Hide And Prevent Copy Of Web Content Using JavaSri...
Hide All Content Of Website Using JavaScript Html Css
Ajax Post Method

  My Link
Islam And We
My Diary (Bangla)
My Diary (English)
My Lyrics (Bangla)
My Lyrics (English)
My Poem (Bangla)
My Poem (English)
My Story (Bangla)
My Story (English)
General Knowledge
Fun And Jokes
Lyrics (Bangla)
Lyrics (English)
Lyrics (Hindi)
Quotations
 
 
  Php:- Check For Valid Email Address  
  Tuesday, January 3, 2012  
 
function checkEmail($email)
{
if( preg_match( "/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $email ) > 0 )
{
return true;
}
else
{
return false;
}
}

Or
function isValidEmail( $email )
{
return preg_match( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email );
}

Or
$email = "someone@example.com";
if( eregi( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email ) )
{
echo "Valid email address.";
}
else
{
echo "Invalid email address.";
}

PHP: Validating Numeric Values and Digits
copy/* numeric, decimal passes */
function validate_numeric( $variable )
{
return is_numeric($variable);
}

/* digits only, no dots */
function is_digits( $element )
{
return !preg_match ("/[^0-9]/", $element);
}
 
  posted by Rz Rasel At 1:26 AM,

0 Comments:

Post a Comment

<< Home

 
     
 
  Problem In Font
Download then zip file unzip and install in your system. Or normal font file just install in your system font folder. Rz Rasel
Bangla Font
Bangla Font

  Find Me In Facebook
 
 

   aaaa
 

   aaaa
 
 
Copyright © 2010 - Amoraboti - Program. ® All right reaserved. Design and developed by:- Rz Rasl