Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6588361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:02:19+00:00 2026-05-25T17:02:19+00:00

Potentially silly question, but I’m looking for the most sensible mechanism by which to

  • 0

Potentially silly question, but I’m looking for the most sensible mechanism by which to maintain and “resubmit” POST variables. Basically the workflow is as follows:

STEP 1) Select charges to pay, and enter payment info

STEP 2) Display confirmation/summary page with option to “PROCEED WITH PAYMENT” or “EDIT INFO”

STEP 3) Return to “edit” form or send data to be processed.

I’m currently using a single page for all actions (just one giant SWITCH based on an “action” var) and submitting the information. The problem I’m having is that between the “confirmation page” and either option, I’m losing my POST data (which I understand). What I need now is a way to preserve that data without duplicating the input fields in each SWITCH section. Below are a few options I’ve considered. Feel free to comment on the merits or stupidity of each:

1) serialize it to a SESSION var then unserialize it?

2) simply key/value it into a SESSION array?

3) recreate every INPUT for each “form” presented and refill the values

4) put the SWITCH inside a single form and only display relevant portions

5) I would handle it all with Javascript (sort of a faux submission technique), but there is currently processing that occurs between the initial form and the summary and ajaxifying that would be a beast atm.

What’s the recommended course of action for the classic INPUT->CONFIRM->PROCESS process? It’d be amazing if I were just missing something über obvious/simple.

FYI: Currently using PHP 5.1.6

Best!

EDIT 1
Clearly using individual pages for the various functionality is desired. The only reason I’m not using separate pages is because other pages are dependent on this one page and management won’t allow a clean break at this point in time. It was poorly constructed over 3 years ago and is just now being partially addressed.

At this point I’m using:

 foreach($_POST as $key=>$value)
      <input type="hidden">.......

…in order to achieve the desired goal.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:02:20+00:00Added an answer on May 25, 2026 at 5:02 pm
    1. serialize it to a SESSION var then unserialize it?
    2. simply key/value it into a SESSION array?

      Very bad. Clicking “Confirm” should always confirm what is being displayed on the page, not what happens to be in some nebulous session stored on some server somewhere (which may not be the same server that served the previous request if you have a load-balanced cluster).

      There are plenty of websites out there which will try to detect when you press the back button and display an error page, probably for related reasons.

    3. recreate every INPUT for each “form” presented and refill the values

      You need to do this anyway for the “go back to editing” page.

      What’s hard about <input type="hidden" ... /> in a loop on the confirmation page?

    4. put the SWITCH inside a single form and only display relevant portions

      You mean stick all the inputs in display:none for the confirmation page? That feels ugly too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Forgive me for a potentially silly question here, but in other programming languages (scripting
This is mostly just out of curiosity, and is potentially a silly question. :)
Potentially embarrassing question, but there is obviously something I'm missing that I want/need to
This may be a silly question to some, but I was curious how would
I've just started programming with Java, so might appear as silly question, but I
Forewarning: a potentially silly question, purely out of curiosity. If, for example, I perform
Potentially a very silly question-- Is it possible to customize Akka/Scala actors such that
Ok this is potentially a noob question but here goes. Is it possible to
This is potentially a simple question but I wanted to ask to avoid running
Please excuse this potentially noobish question but when trying to hide a QWidget what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.