This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

How to setup the "success" page to display submitted form info?


  1. zdzisekg
    Member

    Hi,
    I have a form that is setup to display "Form Review" page. Once the reviewd form is submitted, I need to display the submitted data again instead of the "success" page.
    In confirm.php I uncommented unset($_SESSION['review_id']); at the top of the page, and around line 60 a made some changes that look like this:

    if(!empty($_GET['done'])){
    			if(empty($_SESSION['review_id'])){
    				die("Your session has been expired. Please <a href='view.php?id={$form_id}'>click here</a> to start again.");
    			}else{
    				$record_id = $_SESSION['review_id'];
    			}
    			$markup = display_form_review($form_id,$record_id);
    		}

    For the time being, I'm just trying to redisplay the form, but this time I don't get any values. I get the "Labels" on the form, but not the data.

    Can anyone help?

    Thank you

    Posted 15 years ago #
  2. zdzisekg
    Member

    I think I found my problem. After submit, the data is moved from the review table to the actual table that holds the data.

    Posted 15 years ago #
  3. neilo
    Member

    Hi zdzisekg,

    With the help of this forum, I found that the easiest way to do this is by using session variables passed from one page to the next. It means I don't have to bother with recordsets and db connections on the second page, just add the variables where necessary.

    This is an example I set up to demonstrate: http://www.buffalogals.co.uk/test1.php

    Redityo and Yuniar helped me out with this here:

    http://www.appnitro.com/forums/topic/referencing-input-data-in-the-redirect-thankshtm-page?replies=6

    The great thing is that once you've adjusted the post-functions.php file, it will work for all forms you make, or you could save it to use on other servers if you are using MachForm on other domains.

    Posted 15 years ago #

RSS feed for this topic

Reply