I am trying to stop php from keeping my form submission but am having difficulties. Here is what I started with.
<?php
echo "<form action='' method='post'>
<input id='scan' class='scan' name='scan' type='submit' value='Scanning' />
</form>";
if(isset($_POST['scan'])){
echo "Very good!"
}
?>
I have tried the following:
if(isset($_POST['scan'])){
echo "Very good!"
unset ($_POST);
}
if(isset($_POST['scan'])){
echo "Very good!"
unset ($_POST['scan']);
}
if(isset($_POST['scan'])){
echo "Very good!"
exit();
}
if(array_key_exists('scan',$_POST)){
echo "Very good!"
unset ($_POST);
}
I just can't seem to figure it out. I would like the $_POST to be reset when I refresh the page or when I click the back arrow to get to this page. In this example I would like the text "Very good!" to not show upon page refresh.