Ramtree Posted October 17, 2009 Share Posted October 17, 2009 i need a script that randoms a value automatically every 15 mins. the hard part for me is the timer code. so can anyone tell me how do i write the timer code that randoms a value automatically every 15 mins? Link to comment https://forums.phpfreaks.com/topic/178007-php-timer-code/ Share on other sites More sharing options...
Kaboom Posted October 17, 2009 Share Posted October 17, 2009 For like a captcha? i can give you a captcha php code that just like gives you a number between 1 and 99999 Link to comment https://forums.phpfreaks.com/topic/178007-php-timer-code/#findComment-938532 Share on other sites More sharing options...
Ramtree Posted October 17, 2009 Author Share Posted October 17, 2009 For like a captcha? i can give you a captcha php code that just like gives you a number between 1 and 99999 yes i need to random a number, but i want to random a number every 15 mins. is this possible? Link to comment https://forums.phpfreaks.com/topic/178007-php-timer-code/#findComment-938535 Share on other sites More sharing options...
Kaboom Posted October 17, 2009 Share Posted October 17, 2009 add this at top <?php $_SESSION["code"]=rand(100,99999); ?> Then in your html put Enter the numbers: '<?php echo $_SESSION["code"];?>' that will do it edit: on next page at top add if { ($_SESSION["code"]==$_POST["code"]); } else { echo "Wrong code"; } Link to comment https://forums.phpfreaks.com/topic/178007-php-timer-code/#findComment-938538 Share on other sites More sharing options...
Kaboom Posted October 17, 2009 Share Posted October 17, 2009 Forgot add a form after that on html and use name="code" and have the form post so it works Link to comment https://forums.phpfreaks.com/topic/178007-php-timer-code/#findComment-938540 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.