I'm trying to change my user regristration to require users to use a college email address. I've researched the topic and haven't found anyhting. The closest I have come is finding some php code that checks email addresses but I am having issues making out what to do next. Heres the code:
<?php
$email = firstname.lastname@aaa.bbb.com;
$regexp = "/^[^0-9][A-z0-9_]+([.][A-z0-9_]+)*[@][A-z0-9_]+([.][A-z0-9_]+)*[.][A-z]{2,4}$/";
if (preg_match($regexp, $email)) {
echo "Email address is valid.";
} else {
echo "Email address is <u>not</u> valid.";
}
?>
Could someone please walk me through the process of this code and how I can modify it to meet my needs? Thanks!