I don't have access to CGI::Session, and I'm not sure if I'm doing this right. But, this is what I have. What I'm trying to do is NOT have the DB update with the same record if user hits refresh...
From the source Page:
$cookie = (-name=>"myCookie", -value=>"$date", -expires=>"-1d");
Target Page:
use CGI;
$q = new CGI;
$cookieData = $q->cookie("myCookie");
$date = 'date';
chomp ($date);
print header (-cookie=>"$cookieData", -expires=>'-1d');
if ($cookieData eq $date) {
print "No Refresh allowed"
} else {
Update DB;
}
From the source Page:
$cookie = (-name=>"myCookie", -value=>"$date", -expires=>"-1d");
Target Page:
use CGI;
$q = new CGI;
$cookieData = $q->cookie("myCookie");
$date = 'date';
chomp ($date);
print header (-cookie=>"$cookieData", -expires=>'-1d');
if ($cookieData eq $date) {
print "No Refresh allowed"
} else {
Update DB;
}