Ok so I have had another go on this using dates instead and have come up with:
if ($_SESSION["previousVisit"])
{
// tell user they have already voted and cannot vote again
}
else if ( date("d/m/Y") < $finish )
{
// take the vote from html web form using $_POST
// thank user for voting and display their choice
}
else
{
// tell user voting has finished and that their vote will not count
// display the result of the vote to the user
}
$finish = mktime(11, 15, 0, 12, 2, 2009);
$_SESSION["previousVisit"] = time();
the problem is even if the finish is set to the 2nd December, the user is getting the message that its too late to vote. Any ideas anyone of whats wrong?