Do a trick with several step:
1. create a session variable name datasubmit or any other suitable name and set the value true
i.e $_SESSION['datasubmit']=true; do this process in the first file or first step.
2. Before saving change the value of datasubmit.
3. In the second step before save the data to data change the value to $_SESSION['datasubmit'] to false.
here is an example:
file form.php
<?php
session_start();
$_SESSION['datasubmit']=false;
?>
<FORM method='post' action='save.php'>
<input name="savedata">
<input name="submit" value="submit">
</FORM>
</input></input>
second file, save.php:
session_start()
if(isset($_SESSION['datasubmit'])==true && $_SESSION['datasubmit']==true)
{
//required action to save;
}
else{
//message or action other than saving.
}
?>