Acute Chaos Posted February 22, 2011 Share Posted February 22, 2011 I've found examples out there but I am too much of a noob to get this going. I am setting up a db of users for a members' only site. One field will be for their email address BUT the client wants to block the members' from using one specific domain in their email address. i.e. If when the member is filling out the information, they put the email address as member@hotmail.com, they will get an error message that says something like "hey you can't use your "hotmail" account please use a different one." So I figure from the examples I've seen online I should use explode to separate the email address out? But when I look at the examples that are out there I don't know what the heck I'm looking at in half the code to be able to add this to the code that is validating the validity of the email address. Is there a simple way out of this for a tired blurry eyed noob? Thanks! Quote Link to comment Share on other sites More sharing options...
requinix Posted February 22, 2011 Share Posted February 22, 2011 Could simply check if the address ends in "hotmail.com". Or more flexibly, preg_match('/[@.]hotmail.com$/i', $emailaddress) Quote Link to comment Share on other sites More sharing options...
Acute Chaos Posted February 23, 2011 Author Share Posted February 23, 2011 This seem pretty straight forward even for me so Thanks!! - I'll give it a whirl. I'm in a bit over my head so when I get tossed something extra I feel like my brain is going to explode. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.