Archive: September 2009
Tue
Sep
08

This ones pretty simple. If you’ve ever wanted to make sure you get a real e-mail address through your input forms, a good way to check an address is by using the following e-mail validation.

if (!eregi(”^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$”, $email)) {
//code here
}

This code will check to make sure that the variable “$email” is in an e-mail format. [...]


  Copyright © 2009 Snidge.com. All rights reserved.