Jump to content

Archived

This topic is now archived and is closed to further replies.

ichversuchte

php limiting form options

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.