Jump to content

Moving a field from one page to another after submitting info into database


keram617

Recommended Posts

Hello

I have a little problem that I am hoping someone can help me out with

Here is what I am trying to do:

 

I have build a form where a person can enter their information plus that form will have an autogenerated number in one of the fields (inside the database), then when they hit the submit button I want the information to be entered into the database and then move another another page.

On the second page I would like to have the autogenerated number displayed, this way when the person is going to make a paypal payment it will show who it belongs to, this page will also have a paypal button to allow them to make a payment.

Once the payment is made the owner will receive an email stating that such and such a person with this autogenerated number made a payment.

The owner then can look up the persons information in the database and mark it as "paid"

My problem is that I dont know how to setup the form so it will enter the information into the database and automatically on the next page populate the auto generated number.

 

I am not sure if this is the best way to go about it or if I should consider using one of the shopping cards:

osCommerce, ZenCart, Agora Cart, CubeCart, ShopSite.

I want to make sure that the shopping card is free and it supports paypal.

 

Thank you very much for any kind of help

Mark

Link to comment
Share on other sites

As soon as the page loads, insert a new record and return the insert id (mysql_insert_id()) or lookup the next available id (mysql_insert_id()).

 

You could then store this id in a session variable to pass from page to page (popping it into a hidden input field if you need to).

 

PDid i understand your question correctly?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.