从网页保存动态会话数据

I am new to web development . I am trying to figure out few how to store data for a session on a web page. I am developing a simple site that helps me book flights.

I have a mySQL db in the back end with the table structure

{Route No}
{from_city}
{to_city} 
{price} 

I have managed to create pages to retrieve flight details from the DB.

I need help in the next stage, i.e Once a particular flight is selected and the submit button pressed, users will be presented with a screen that presents the basic flight details and 5 rows for the flight they have selected. Each row represents one seat on the flight. The row should have a checkbox so it can be selected and checkboxes for "Child", "Wheelchair" and "Special Diet".

Below this there should be a display of the total number of seats selected.

At the bottom of the page there should be a button labelled "Add to Bookings".

  • This button should not work unless at least one seat has been booked.
  • If users attempt to add to bookings without any seats booked, then a dialog box or message should appear.
  • If the user has correctly selected one or more seats and pressed the "Add to Bookings" button, they should be presented with a screen that lists their booked flights.

At the bottom it should have buttons with the following options

  • "Book more Flights"
  • "Clear all booked flights" and
  • "Proceed to Checkout".

If the user presses the "Clear all booked flights" menu option, then all flights booked so far should be deleted from the session. If the user presses the "Book more Flights" button they should be sent to the search page exactly the same as if they had pressed the "Search Flights" option of the main menu.

How do I store the information of the flights and other variables in a session using HTML5, Javascript , PHP or jQuery. Thanks