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 456191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:26:48+00:00 2026-05-12T22:26:48+00:00

I have a main form with a lot of inputs. The forms action is

  • 0

I have a main form with a lot of inputs. The forms action is set to a php file.
After submitted the php-page shows up with all the inputs that the user typed into the form. The user has to re-check everything and hit an ‘approve’ button!
The problem is, I don’t know how to do this…

I want to eventually put all data into a MySQL database, but only after hitting approve, not submitting the form!

Is there a way to ‘recall’ the php script after clicking the button ‘approve’?

How is this done? I mean, I don’t want to write information to the MySQL database, and then the user regrets and DOESN’T hit ‘approve’ and then the data is already in the database.

Thanks!

Just let me know if you need more input (I will then update the question)

  • 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-12T22:26:48+00:00Added an answer on May 12, 2026 at 10:26 pm

    One way to accomplish this is rewrite every value that was just submitted into the approval form in the form of html hidden inputs. Like this:

    <form name="approval" method="post>
        <input type="hidden" name="firstname" value="<?php echo htmlspecialchars($_REQUEST['firstname']); ?>" />
        <input type="hidden" name="lastname" value="<?php echo htmlspecialchars($_REQUEST['lastname']); ?>" />
        ...
        <input type="submit" value="Approve!" />
    </form>
    

    Others have suggested storing the values in the users session. If you choose to go that route, be careful about user’s who like to work with multiple browser windows open at the same time. Their different forms will share the same session and depending on what order they choose to submit forms in, you could end up with some crossed wires if your code is too naive. One way around this is to generate a unique key for each form and pass it around from page to page. This of course gets messy which is why I prefer the hidden form field approach.

    Another pitfall related to the session approach is the PHP’s default session implementation uses the local filesystem to store session data. This breaks down when you have redundant web servers. You can, of course swap the default file based session implementation for something more sophisticated (based on memcached perhaps). But again, this is just more complexity. Why not avoid the complexity and stick with hidden form fields?

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

Sidebar

Related Questions

I have a form, like so: <form action= method=post> <select name=pageType> <option value=main>Main Page</option>
I have two forms, one is the main form and the other is an
I have a WinForms application. the main form is has a lot of controls
lets say i have a main form which have a lot of functionallity. this
I have a main Form. There is a linklabel. If i click on it,
I have a Main form.I want to launch another form from it and launch
I have a main form, and a floating child form that is non-modal. The
I have a main form and non-modal autocomplete form. How can I prevent the
I have a main form with a tab control containing multiple subforms. I need
i have a main form that contains an inner form (that inner form appears

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.