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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:49:17+00:00 2026-06-18T08:49:17+00:00

I have a form that uses Post to send info to a PHP page.

  • 0

I have a form that uses Post to send info to a PHP page.

The PHP page;

  • Takes the form info.
  • Rearranges it.
  • Formats it.
  • Then turns it into a code string that’s ultimately sent to another
    page and performs some tasks using that info.

Form Code:

<form method="post" action="_php/buildMyPNR.php" name="GuestInfo" 
      onSubmit="return validateFormMethod1();">

<input type="text" name="AccountNumber" id="BID" 
       onkeypress="return isNumberKey(event)" size ="16"/>

<input type="hidden" name="requestID" id="RID" value="" />

..... bunch of other fields

<input type="submit" name="loadURL" id="submit" value="Submit" 
       onsubmit="return ValidateFields();" />

</form>

What I need to do is;

  • Generate a sequential number each time the page is used.
  • Pass that number with the post request (Sort of like a serial number
    for the request), to another form say _php/buildMyPNR.php.
  • When _php/buildMyPNR.php loads, save the values of
    AccountNumber and requestID to a database or similar.
  • Ultimately it would move on to _php/usageSummary.php, where the user can click
    a button to return a list of AccountNumbers paired with the
    requestID that was generated for the request.
  • Possibly download the list in an excel spreadsheet format, but it is
    not absolutely necessary.

What would be the best way to accomplish this?

Mainly I need help with generating the requestID. I need them to be sequential so I assume that I would need to start with a number in my database like 00001, query that number from my form, add 1 to the returned value, then save the new value along with the AccountNumber when submit is pressed.

I have no experience with databases and any guidance would be greatly appreciated.

  • 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-06-18T08:49:18+00:00Added an answer on June 18, 2026 at 8:49 am

    Ideally we’d see some schema and examples of code you’ve already tried…

    However, you can use an Auto Increment field in your Database Table, which will accomplish the ID incrementing for you.

    enter image description here

    If you’re using mysqli for your mysql database interaction (as you perhaps should be), then you can then retrieve this autonumber using;

    $PassedRequestID = $mysqli->insert_id
    

    Then pass this to your next page.

    You will then need to query your database with something like (psuedo code);

    SELECT Accounts.*, Requests.*
    INNER JOIN Requests ON Requests.AccountID = Accounts.AccountID
    WHERE Requests.RequestID = $PassedRequestID
    

    For exporting to Excel, if you search for PHP export CSV using Google, there’ll be plenty of examples there to choose from. However, as an example;

    http://code.stephenmorley.org/php/creating-downloadable-csv-files/

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

Sidebar

Related Questions

I have page1.php that uses a form to send the following data: <form action=page2.php
I have a form that uses the POST method to send data. The POST
I have a WPF form that uses ClientLogin to log a user into their
I currently have a PHP form that uses AJAX to connect to MySQL and
This is the page that uses this code. I have a php page which
Currently I have a small form that uses a asp:linkbutton to submit and send
I have a form (form.php) that uses the following JS code in the header:
I have a form that uses a JQuery Json post. I have 10+ textboxes
I have a form that uses jQuery to submit an ajax post and it
I have a form that uses Richtexteditor of Flex3 to write in their reply.

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.