Getting submitted form value for confirmation page

user4786885

to descibe simply, I've 3 php files- form.php, save.php & confirm.php

form.php is a general form having

<form id="form" name="form" method="post" action= 'save.php' ><form>

save.php is for updating SQL by insert command

$sql = "INSERT INTO database (name, age, sex, id) VALUES ('$name', '$age', '$sex', '$id')";

I'm also using header same page to redirect after save

header('Location: confirm.php');

Now what I'm expecting When people submit form, data will save to SQL & redirect to confirm.php where they can see their submitted data.

Its redirecting after save but I can't figure out the way to getting submitted data on confirm.php , I've tried to use $_SESSION but page is getting blank. I'd be great If I can pass submitted form's $id to confirm.php with $_SESSION or someting so can I can call $id from confirm.php & get the data. Please suggest how to do that.

Mohit maru

Get inserted ID through $id = mysqli_insert_id(); and pass header('Location: confirm.php?id='.$id);

and get details through this id.

in confirm.php $_REQUEST['id'];

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Getting submitted form value for confirmation page

From Dev

form is not getting submitted

From Dev

Form not getting submitted

From Dev

select values in a form not getting submitted

From Dev

I need help getting a form on a php page to force a refresh of the page when submitted

From Dev

DropDown value not getting submitted in MVC

From Dev

Add paypal payment confirmation to mysql after form is submitted

From Dev

Ruby on Rails: Getting the value from a select form field before it's submitted

From Dev

Form not getting submitted inside delegate event

From Dev

Php form is getting submitted without submitting

From Dev

Form not getting submitted via AjaxForm/JQuery

From Dev

Angular form not getting submitted with ng-submit

From Dev

Prevent to go another page until form is submitted

From Dev

Send a JavaScript Variable to another page to be submitted with a form

From Dev

Redirect the Page after Form is Submitted - Javascript

From Dev

Show in the email from which page the form was submitted

From Dev

Rails: In a controller, add a value to the params submitted by a form

From Dev

Get value of a submitted form without submit button

From Dev

Rails after form submitted redirect to empty form page again

From Dev

Scroll down to contact form at bottom of page when form is submitted with errors

From Dev

Scroll down to contact form at bottom of page when form is submitted with errors

From Dev

Staying on same page after the form is submitted and then process the form again

From Dev

AngularJS & Bootstrap modal Form. Why data is getting submitted on cancel

From Dev

jquery validator - form still getting submitted even when invalid

From Dev

jquery validator - form still getting submitted even when invalid

From Dev

When the timer count down to zero the form is not getting submitted

From Dev

django - prevent form submission if submitted form value is X

From Dev

django - prevent form submission if submitted form value is X

From Dev

Table generated from DB using sevlet not getting submitted when form is submitted

Related Related

  1. 1

    Getting submitted form value for confirmation page

  2. 2

    form is not getting submitted

  3. 3

    Form not getting submitted

  4. 4

    select values in a form not getting submitted

  5. 5

    I need help getting a form on a php page to force a refresh of the page when submitted

  6. 6

    DropDown value not getting submitted in MVC

  7. 7

    Add paypal payment confirmation to mysql after form is submitted

  8. 8

    Ruby on Rails: Getting the value from a select form field before it's submitted

  9. 9

    Form not getting submitted inside delegate event

  10. 10

    Php form is getting submitted without submitting

  11. 11

    Form not getting submitted via AjaxForm/JQuery

  12. 12

    Angular form not getting submitted with ng-submit

  13. 13

    Prevent to go another page until form is submitted

  14. 14

    Send a JavaScript Variable to another page to be submitted with a form

  15. 15

    Redirect the Page after Form is Submitted - Javascript

  16. 16

    Show in the email from which page the form was submitted

  17. 17

    Rails: In a controller, add a value to the params submitted by a form

  18. 18

    Get value of a submitted form without submit button

  19. 19

    Rails after form submitted redirect to empty form page again

  20. 20

    Scroll down to contact form at bottom of page when form is submitted with errors

  21. 21

    Scroll down to contact form at bottom of page when form is submitted with errors

  22. 22

    Staying on same page after the form is submitted and then process the form again

  23. 23

    AngularJS & Bootstrap modal Form. Why data is getting submitted on cancel

  24. 24

    jquery validator - form still getting submitted even when invalid

  25. 25

    jquery validator - form still getting submitted even when invalid

  26. 26

    When the timer count down to zero the form is not getting submitted

  27. 27

    django - prevent form submission if submitted form value is X

  28. 28

    django - prevent form submission if submitted form value is X

  29. 29

    Table generated from DB using sevlet not getting submitted when form is submitted

HotTag

Archive