ichversuchte Posted April 26, 2006 Share Posted April 26, 2006 I am trying to write a some code to set a restriction on a text box on a form. I want to restrict all users to use this that doesn't have a @iup.edu at the end of there email address. Is there anyway to do this with php? If so how? Quote Link to comment Share on other sites More sharing options...
.josh Posted April 27, 2006 Share Posted April 27, 2006 is the user already logged in? if so, then just grab the user's email address wherever var you have it in (i'm using $useremailaddress as generic var), get the last 8 chars of it and put that into a var ($checkaddress) and if $checkaddress does not = @ipu.edu then display the text box or do whatever you wanna do. $checkaddress = substr($useremailaddress,-8);if ($checkaddress != '@iup.edu') { /* insert text box here Quote Link to comment Share on other sites More sharing options...
ichversuchte Posted April 27, 2006 Author Share Posted April 27, 2006 thank you ....it worked and was a big help ... 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.