Hi All,
I am trying to create a form using sessions so that the submit button is only submitted once in a two minute duration. I need the form to still complete the onclick action so that a calculation happens, but I only want the mail() function to send an email only once in that two minute duration.. even if the submit button is clicked more than once... here is what I got so far.. but doesnt work..?? What am I missing..??
<?php session_start();?>
if (!isset($_SESSION))
$_SESSION = time();
if (time()-$_SESSION < 120)
die('Post limit exceeded. Please wait at least 120 seconds');
else
$_SESSION = time();