So, I have a form which I submit once and redirect it withing the same page and after the refresh I execute some scripts on the data.
For ex, if my page is index.php I can summarise it like this:
<?php
if(isset($_POST['msg']))
{
//do smth
}
$_POST=array();
?>
<html>
....
<form action="index.php" method="post">
<input type="text" id="msg" name="msg">
<button type="submit">Submit</button>
</form>
....
</html>
The problem is that after the first submission, the POST variable regains its initial value after every page refreshment even though I delete it every time and I don't resubmit the form.
So what should I do?