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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:16:12+00:00 2026-05-23T11:16:12+00:00

I have set up a database and have form data being submitted to it

  • 0

I have set up a database and have form data being submitted to it via $_POST in PHP, and I also have my page set up and working which pulls in the fields from the database and displays them. Not rocket science I know.

However what I want to do now is place a page inbetween the submission of the form and the insert in the database, to give the user a chance to check their entry.

I have created this page and used the $_POST data to display the data from the form (as it has not been entered into the database yet), however i’m wondering how, if the user approves the submission, I then INSERT it into the database. (I’ve tried running the INSERT query from the $_POST data on pressing a submit button, however because (I assume) ivew interrupted the flow between the original form submission and the INSERT query, all I get is a list of errors for unrecognised variables.

So what I have is this process:

form.php /user enters info using $_POST

preview.php /user is previewed info using $_POST and Session code starts (below)

submit.php /MySql query runs but returns all errors for undefined indexes

This is my session start code:

session_start();
if (isset($_POST['preview'])) { 
    $_SESSION['company_name'] = $_POST['company_name'];
    etc etc - remaining form field names
} 
  • 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-23T11:16:13+00:00Added an answer on May 23, 2026 at 11:16 am

    POST data is not automatically passed on to other pages. Save the submitted data in the session and read it from there after the confirmation page, or insert all that data back into the page using <input type="hidden"> elements, so they can be resubmitted as POST.

    A very simple illustration of the process using sessions:

    form.php

    <form action="confirm.php" ...>
        ...
    </form>
    

    confirm.php

    <?php
    session_start();
    $_SESSION['data'] = $_POST;
    ?>
    
    Please confirm:
    
    Name: <?php echo htmlspecialchars($_POST['name']); ?>
    ...
    
    <a href="save.php">Confirm</a>
    

    save.php

    <?php
    session_start();
    $data = $_SESSION['data'];
    
    // save $data to database
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I currently have a table view which is being filled via Core Data.
Suppose the following: I have a database set up on database.mywebsite.com , which resolves
I have a mysql database set as utf-8, and csv data set as utf-8,
I have a data entry form that has remote validation set up to check
I have a form that you can add data to a database. It is
I have a very simple PHP form, which shows a checkbox, and will store
I have followed three tutorials, one on submitting form data to a php file,
Ok, here is my dilemma I have a database set up with about 5
I have a legacy database set with NLS_LANG set to IW8ISO8859P8. This I cannot
If you have a set of tables in the database that strictly consist of

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.