Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.