Suppose I have 2 forms which will be submitted step by step. In first page, I have
Page1 :
<form action='page2.php' method='post'>
<input type='email' name='email'>
<input type='submit' name='submit' value='Submit'>
</form>
Page2 : In this page, I'll check if the email is available in my website or not. If available, then the email will be showed and the user will be asked for his/her phone number.
if(isset($_POST['submit'])){
echo $_POST['email'];
?>
<form action='page3.php' method='post'>
<input type='number' name='number'>
<input type='submit' name='submit' value='Submit'>
</form>
<?php
}
Page3 : When the phone number is given, it will be validated here and the user will be redirected to 'somepage.html'.
Now, my question is, I'll take care of the form resubmission problems. But I don't want users to see the 'Form resubmission' dialogue box in there browsers every time they refresh Page2. And this process has to be done in two steps. In Page2, it is necessary to show the posted email in Page1. How can this whole process be done? It'll be helpful to me if the code is written from beginning to end (from Page1 to Page3).