Form post Send data to another page , verify and then post

I have a form with ,

In the form after user clicks on Submit , he will be taken to another page which would show all the data entered, Which would allow the user to verify the content.(User will have a look at the content , to see what he entered is correct).

Once user verifies he would submit the data and Insert to DB should be done.

I want to know a method in which i could carry on the approach, to do this.

How can i implement this



The Main Div With Form

<div class="panel-body">
Employee : <input Type="text" id="name">
<input type="submit" value="check">

The Second Div in the same form should show once submit is clicked

<div class="submit panel-body">
Employee : <Employee Name asin main div>
<input type="submit" > <--! this submit would post data

how to pass the value from 1st div to the second , and from the second INSERT to can i do without page refresh ?


Use following script on location file


//create form here
//Change the action of form
$action = 'save.php';
echo '<form method="POST" action="'.$action.'">
<input type="text" name="nric" value="'.isset($_POST['nric'])?$_POST['nric'].'" />
<input type="text" name="empName" value="'.isset($_POST['empName'])?$_POST['empName'].'" />
<input type="text" name="location" value="'.isset($_POST['location'])?$_POST['location'].'" />

EDIT: You don't need to use a form in this case. You can simply use JQuery to show the data from text boxes in a DIV and a button that will POST the data for you on the server.

    <input type="text" name="nric"  id="nric" />
    <input type="text" name="empName" id="empName" />
    <input id="sndData" type="button" value="Submit" />

<div id="showData"></div>


    var makeData = "<p>NRIC: "+$('#nric').val()+"</p><p>Employee Name: "+$('#empName').val()+"</p><p>Location: "+$('#location').val()+"</p>";

When you've done that, just create/show a HTML button that will POST the data for you. If this answers your question, please mark it as an answer.

Need Your Help