James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Could someone show me the code to pull data from a MySQL database and store it in a session/array on the click of a button.
Cheers, James
|
Laney
Member
Registered: 6th May 03
Location: Leeds
User status: Offline
|
What exactly are you wanting to do with it? 
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Well im trying to create an online bike shop for a uni project, basically i have a page with a list of bike details and pictures etc, with a button to hire and a button to buy. when you click either button i want it to take the relevant bikes details from the database and store it into a session, so that the data can be used on a shopping basket page later on.
Hope that explains it ok
|
Laney
Member
Registered: 6th May 03
Location: Leeds
User status: Offline
|
This might not be the best way, but this is how I'd do it:
Retrieve the info from the table using the BikeID that was passed to the script from the button (using the GET method probably)
Assign to a variable. Ie. BikeColour
Assign to a session key $_session['bikecolour']=$BikeColour
Any help?
|