Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Customer Booking - Data carrying

Status
Not open for further replies.

sipps

Technical User
Feb 9, 2003
133
GB
Hi all,

I have a problem, in that I cannot think how a function on my site can work. The first page that a customer can see when entering my site is a booking page. They choose booking location, date, time etc, and submit this data so the system can search for a vacancy against current bookings. If this comes back clear, and the booking is possible, they are then asked to enter their customer details and payment method.
Problem is, to make a booking you need to have a Customer_ID, but you want get one of these until you have filled in the customer registration form.

My question is, how much information can I carry through from page to page, holding the booking information? I know I can keep POSTing this through, but then I need to INSERT the customers details before I can INSERT the booking details. Where can I hold the booking information whilst I insert the new customer record?

Also, has anyone ever done a complicated booking query before? I'm having real trouble pulling back some data with my query.

Thanks
 
You could post through, or more elegantly you could use sessions... I'm sure someone's written a faq on them, here's the page in the php manual for them as well...


Hopefully that'll get you started with that part...

as to the other parts I'm afraid I'm no help.

-Rob
 
I have set a session up for a registered user, but I am not sure how to use this session to actually hold the data that they enter on the booking form, adn more importantly the data that comes back from the backend saying that the booking is ok.
I will look at the manual again, cheers.
 
Presumably you'll be reading whatever data into a variable at some point or another in your script... let's call that variable $foo as such
$foo = "Hi";

instead say

$_SESSION['foo'] = "Hi";

and on any other page which is a part of that session and on which you've called session_start(), you can say

print $_SESSION['foo'];

and you'll get that value back.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top