I have never had a situation before where my client does not want a database just text files with values that read/write data but I have now. There are going to be very few concurrent users and in spite of my efforts to sell the idea of a database (it's easier to setup!!) she is insistent.
So im stuck - on how to:
1) Have list menus which read values from files ages.dat and venues.dat:
2) Select the submitted age and venue and determine up and coming events (index.php)
3) Query events.dat file and return details for age and venue (details.php)
4) Display details.php allow user to select 1 event and allow user to enter number of places
5) Keep track of booking details and cost & serve up customer form cust.php
6) Enter customer payment details, validate and submit
7) Gert next booking number update events.dat (check availability first) & record in transaction file - increment booking number and send acknowlegdement
I have searched CSV read and write but having not done this before I am most confused
Here is the data in question:
ages.dat
A,Under 25
B,25 to 35
C,36 to 45
venues.dat
R,Tsari Night Club Ringwood
C,Peaches and Cream City
M,LJ's Mentone
booknum.dat
1
events.dat
1,AR,January 5 2007,7.00 pm,48,0,0
2,AR,February 10 2007,8.00 pm,48,1,1
3,AR,March 2 2007,7.00 pm,48,0,0
4,AR,March 14 2007,8.00 pm,45,8,12
5,AR,April 4 2007,7.00 pm,45,8,10
6,AR,April 28 2007,7.00 pm,48,6,4
7,AR,May 19 2007,8.00 pm,48,6,4
8,AR,June 2 2007,7.00 pm,48,0,0
In details.dat I have to store fields:
Bookingnum, familyname, title, address, suburb, email, creditcard, creditcardnum, etc