Page is a not externally linkable
arvind_gupta - 6:58 am on May 18, 2010 (gmt 0)
I generally tend to use a random key to stop multiple form submission. For eaxmple:
<?php
session_start();
// Process form
if(isset($_GET['submit']) && $_GET['key'] == $_SESSION['key'])
{
// Process
echo 'processed';
}
else {
echo 'not prcoessed';
}
?>
<?php
$_SESSION['key'] = mt_rand(1, 1000);
?>
<!-- Form -->
<form action="" method="get">
<input type="hidden" name="key" value="<?php echo $_SESSION['key'] ?>" />
<input type="submit" name="submit" value="Submit" />
</form>
Hope this helps!