I have a page which is doing an insert. The DB table has a unique column called "order" that auto increments upon adding a new row. I am executing the insert in this way:
$insert = <<<SQL
INSERT INTO `order` (name, email, team, project, startdate, enddate, comment, server) VALUES (?,?,?,?,?,?,?,?);
SQL;
$instat = $mysqli->prepare($insert);
$bind = mysqli_stmt_bind_param($instat, "ssssssss", $name, $email, $team, $project, $timestart, $timeend, $comment, $code);
$exec = mysqli_stmt_execute($instat);
mysqli_stmt_close($instat);
mysqli_close($mysqli);
I am allowing the DB to handle an auto increment of the order column so that it cannot be duplicated. This works just fine, but if I were to hit refresh on the page, it will insert another row with the same data on a new unique order id. How can I prevent another insert upon a page refresh?