.edu Membership Only?

Discussion in 'PHP' started by maplater, Sep 17, 2006.

  1. #1
    Can anyone tell me the difficulty of modifying a membership to only accept emails ending in .edu, like facebooks? I hoping this does not involve any deep script editing, which I would guess would be costly. Thanks for the help.
     
    maplater, Sep 17, 2006 IP
  2. ip076

    ip076 Peon

    Messages:
    79
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Here's a pretty simple function....

    
    function CheckEmail($Email)
    {
     //Compare last 4 characters against .edu to determine if the email is valid.
     if(strtolower(substr($Email, -4, 4)) == ".edu") return true;
     else return false;
    }
    
    PHP:
    What you will need to do is find the code that verifies that the email entered in the registration form is valid and use this function in that section or immediately after it. Are you using a commercial or open source script like phpBB?

    Maybe you could find the function/code being used to check the email address validity and post it here, I might be able to help you use this function.
     
    ip076, Sep 18, 2006 IP