I have a store which works like this:
The problem is, a simple refresh causes an empty table to be sent per email. How can I prevent this? Can I redirect somehow after the execution of the mail function? So the thank you page doesn't do anything on refresh?
You can do by calling the PHP
header() function like this:
header('Location: thankyou.php'); exit;
The user will be redirected to the thankyou page and a reload there will not execute your code again.