Need help: Login screen with particular domain

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
benz862
Forum Newbie
Posts: 1
Joined: Tue Jun 28, 2011 7:53 am

Need help: Login screen with particular domain

Post by benz862 »

I need a PHP script that will direct a person (upon logging in) who uses their email address as their username to be redirected to a different web site.

i.e. If person "A" had the domain of "personA@abc.com" they would be directed to web site "123.com"
If person "B" had the domain of "personB@xyz.com" they would NOT be allowed to log into the site, thus no redirection to "123.com"

Any ideas? Please advise. Thanks in advance
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Need help: Login screen with particular domain

Post by Jade »

You need to parse their email address to figure out what the value is after the @ symbol. Take a look at strpos() and substr() in the php manual.
Post Reply