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? Link to comment https://forums.phpfreaks.com/topic/8473-php-limiting-form-options/ 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 Link to comment https://forums.phpfreaks.com/topic/8473-php-limiting-form-options/#findComment-31221 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 ... Link to comment https://forums.phpfreaks.com/topic/8473-php-limiting-form-options/#findComment-31346 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.