Jump to content

I have a basic form. but i want to...


Monkuar

Recommended Posts

Make it so the user can only use it once every x minutes or twice every 5minutes  or vice versa.. i looked on google for tutorials but i cant find anything and i got no clue it's out of my boundries of knowledge care to help me?

 

and it stores in the users cookie.. [i dont care if people can delete cookie] most wont and kinda need it to be stored in cookie.

Link to comment
https://forums.phpfreaks.com/topic/157742-i-have-a-basic-form-but-i-want-to/
Share on other sites

Ok.....

 

 

<?php
$the_time_now = (time()+(60*5));
setcookie('form_submit', TRUE, $the_time_now, '/');

 

That will set a cookie on the users computer called form_submit that will expire in 5 minutes. When you load the form check for the cookie. If it exists, then that computer used the form within the last 5 mins.

But the user can just clear cookies to bypass that.

 

I know.. but the basics of deleting a cookie and re doing it again again takes time and it's fine.. holy cow man, lol :)

 

Ok Gevans Is that all i got? form_submit is the name? :)

 

wat about the else function and if? lol srry im really noob but ur helping me :P

Archived

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

×
×
  • Create New...

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.