I am looking for a way to stop inserting or sending data in the database when refreshing the page.
here is my code:
user_details_page.php
<
We can stop it without redirect , best way to use PHP $_SESSION like this :
if($_SERVER['REQUEST_METHOD'] == 'POST' && empty($_SESSION['form_submit']) )
{
extract($_POST);
$sql=""INSERT INTO table (username, useremail, email) VALUES('$username','$useremail','$email')";
$_SESSION['form_submit']='true';
}
else
{
$_SESSION['form_submit']='NULL';
}