Log in

View Full Version : php form submission



moose86
02-08-2012, 08:51 PM
Hi guys,

I have a HTML form linked to a PHP file that sends and email to my email, the form has a terms and conditions box to tick if the user has read them, what i would like to know is:

is there a way to make it check if the user has opened the T&C's page and if not display a php message in the form and not allow the form t be submitted?

P.S have looked everywhere i can think of online for this, I cant find anything suitable.

Thanks is advance :)

fastsol1
02-08-2012, 10:00 PM
Try something like this. On the t&c page set a cookie or session var when the page loads. Then on the main page once they submit the form check if that cookie/session var has been set and if not return a error message to them.

traq
02-09-2012, 12:48 AM
is there a way to make it check if the user has opened the T&C's page and if not display a php message in the form and not allow the form t be submitted?

P.S have looked everywhere i can think of online for this, I cant find anything suitable.

there really is nothing "suitable." For example, in fastsol's suggestion above, how do you know that the user didn't read the Terms on an earlier visit?

For that matter, you still don't know that they read the Terms even if you force them to open the page on every visit.

At the end of the day, EULAs (of which TOS agreements are a subset) are questionably enforceable, at best - simply on the grounds that no one reads them (http://www.geek.com/articles/games/gamestation-eula-collects-7500-souls-from-unsuspecting-customers-20100416).

In practice, an un-checked "TOS" box is generally sufficient for websites. If you want to be sure that they read the TOS, you could have a quiz as part of the registration process... :D

djr33
02-09-2012, 06:54 AM
I agree with traq. The best you can do is to force them to "admit" to having read the TOS. Then it's their fault (even legally) if they don't know something.

Of course it wouldn't be very nice to trick them into not reading the fine print, but as long as you make a reasonable effort to make the TOS clear (and potentially even if you don't), you've done your job as long as they signal that they did read it and agree to having done so.


If you want to force them to read it, I suggest embedding the TOS into the registration form. If it's too long, then cut it down or even make a shorter version as a preview and add a link to the real TOS. No one is going to read 50 paragraphs. Most users will probably at least skim 1.

hosam
02-13-2012, 05:10 PM
well I suppose there is solution to check if they clicked the link of T&C, but not sure if they read or not but at least the clicked and open the T&C page.
so here what you need to do is check:
if user clicked the button then allow them to resume if not show error message and that will not going to work with php it just javascript and also have problem cause its not server side and the user could change it, but hope it'll help. but I'm also recommend to use fastsol1 solution for this one. or use traq solution with check box under T&C.

jbrill1012
02-16-2012, 04:19 AM
Hi guys,

I have a HTML form linked to a PHP file that sends and email to my email, the form has a terms and conditions box to tick if the user has read them, what i would like to know is:

is there a way to make it check if the user has opened the T&C's page and if not display a php message in the form and not allow the form t be submitted?

P.S have looked everywhere i can think of online for this, I cant find anything suitable.

Thanks is advance :)

Taking a stab in the dark here, but you would be better off just presenting the T&C's such as the same way you registered for these forums if they are that important.
onSubmit redirect to T&C's html page have a check box there to agree to and another button to submit the form information to email. This way there's no doubt they were directed to the T&C's it's up to the individual to read them which you can't force...

nancycatherine
02-22-2012, 09:42 AM
Hello Guys!!!

Thanks for your information...its really helpful to me...