Jump to content

[SOLVED] Submit once...


Aureole

Recommended Posts

I use this method, don't see any issue with it

form.php

<?php
//Add this to form
$rand = rand(0,10000);
echo "<input type=\"hidden\" name=\"FormID\" Value=\"".$rand."\" />";
?>

processer.php

<?php
//At top
if($_SESSION['submitted'] == "yes" && $_POST['FormID'] == $_SESSION['FormID']){
exit($_POST['FormID']."Has Been Submitted");
}
//in processing part
if(processed){
$_SESSION['submitted'] = "yes";
$_SESSION['FormID'] = $_POST['FormID'];
?>

Link to comment
https://forums.phpfreaks.com/topic/61306-solved-submit-once/#findComment-305032
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.