Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6676 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am building a registration system that processes multiple registrations by the same payer (eg a student registering in more than one course and/or more than one student registering in the same course).

If I use sessions to keep all variables in play, how do I process the web form data to a database? Do I do it bit by bit using a Submit button on each web form or wait until I have all the form fields entered and do one big processing to the database at the end? If so, how does the final Submit button know to process the data from all the earlier forms as they are not connected by the same HTML code?

Cheers,

Steven

Posted

hmm

This is quite a good project.

The key is planning and vision.

What do you want entered in what database?

For instance in our shopping cart solution, we have a specific order database that tracks the contents of the cart and we add and change data with that database on the fly.

Then when a person is ready to checkout, we connect that data with a customer number and process the orders.

Similarly with your courses, you would have your "Shopping cart" or courses, A "Customer" and then a "commit" to an order.

You may want to do some of both. It is a big task to keep track of all the session variables without storing them in a temporary database somewhere.

As for entering session variables into the database, it should be similar to $_GET and $_POST.

1. send the person to a checkout page

2. Grab all session variables and place in variables

3. Create a New or Edit and old record using these variables.

ie)

$name = $_SESSION['name'];

etc.

Posted

Hi Mark,

Thanks for that.

So I think I need to do all of the following:

1. Start each page (.php) in the process with session_start();

2. List all session variables on the first page of the process (I'm not sure if this is necessary):

$_SESSION['coursecode']='';

$_SESSION['coursename']='';

$_SESSION['dates']='';

$_SESSION['venue']='';

$_SESSION['presenters']='';

$_SESSION['payers']='';

$_SESSION['payername']='';

$_SESSION['payerphone']='';

etc.

3. Based on what you have said, add all session variables to the last page in the process where the data gets submitted to the database:

$name = $_SESSION['name'];

$coursecode = $_SESSION['coursecode'];

$coursename = $_SESSION['coursename'];

$dates = $_SESSION['dates'];

$venue = $_SESSION['venue'];

$presenters = $_SESSION['presenters']';

$payers = $_SESSION['payers'];

$payername = $_SESSION['payername'];

$payerphone = $_SESSION['payerphone']';

etc.

Is that eveything?

Cheers,

Steven

This topic is 6676 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.