I have 3 php pages, on the first I have a form where the user can enter his account (email adress) and the amount he wants to deduct from his account. On the second I have the call of the function and the sucess message shown. On the third page the function send() is done, which open the DB connection, change the amount for the account and save it.
First page:
<form action="send_exec.php" method="post">
Amount: <input type="number" size="24" maxlength="4"
name="points_send" min="0"><br><br>
Account<input type="text" size="24" maxlength="50"
name="email"><br><br>
<input type="submit" value="Send">
</form>
Second page (send_exec.php):
<?php
include("update_send.php");
$email = $_POST["email"];
$points_send = $_POST["points_send"];
settype ($points_send, "integer");
send($email, $points_send);
echo ("Success");
?>
Third page (update_send.php):
//some calculations are done before this to get $new_points
function send($email, $points_send)
{
$mysql_update_points = "UPDATE user SET points = ('$new_ponints') WHERE email = ('$email')";
$mysql_update = mysql_query($mysql_update_points);
}
Problem is now that when I perform the action on the first page and I end up on the second: How can I disable that when just clicking F5 / reload in my browser that the action is called again?