Hi all, as titled i need to create a cinema ticketing system which i am very headache to it. Here are some problem i faced, actually i need to create a very complex one as the webpage
1) Need to able to select the number of ticket required before enter to the seat selecting page (so that it can select number of seat based on the number of ticket enter - i only managed to do 1 ticket at the time.
2) After selecting the ticket and press the "book" button, it will come to a page where it show the seat status (blue for booked, red for unbooked) instead of this, i want the seat number to be shown as well in this page, any idea?
3) Besides, u can see that the date is only for today, how bout if i want to make it for multiple date?

I alraedy attached the html. Hope u guys can help me, thanks :)

Dani AI

Generated

A practical way to tackle this is to split the system into three clear layers: front-end state and UX, an API that serves seat layouts and availability, and a small database to store showtimes, seats and bookings. has the interface idea; is correct that availability becomes a database concern; is right that a single static HTML file won’t be enough for a robust solution.

Front-end notes: implement a two-step flow — select ticket count and ticket type, then open the seat map for a specific showtime. Persist the ticket count between pages via session (server-side), a short-lived token, or localStorage. Render each seat element with a visible label and a data attribute (for example data-seat-id). Client logic should toggle selection, show the seat number inside the UI element, and refuse additional selections once the chosen ticket count is reached. Keep all status colors tied to semantic classes like available, held, booked so styling and accessibility are simple to manage.

Server and DB guidance: model auditoriums, seats, shows (date/time), and bookings. Use a UNIQUE constraint on (show_id, seat_id) to prevent double-booking. Use a “hold” state with reserved_until for short reservations while the buyer completes payment, and expire holds with a background job. Final booking must verify availability server-side inside a transaction (or with INSERT-and-check) to avoid race conditions.

Example table sketch:

CREATE TABLE shows (id INT PRIMARY KEY, auditorium_id INT, start_time DATETIME);
CREATE TABLE seats (id INT PRIMARY KEY, auditorium_id INT, row CHAR(2), number INT);
CREATE TABLE bookings (
  id INT PRIMARY KEY, show_id INT, seat_id INT,
  status ENUM('held','confirmed','cancelled'),
  reserved_until DATETIME, created_at DATETIME,
  UNIQUE (show_id,seat_id)
);

Multi-date support is simply different show records; present a date/showtime picker, fetch availability for the chosen show_id, and update the map. For live updates, use short polling or WebSocket broadcasts so two users see changes quickly. A good incremental path: build a front-end prototype with fixed JSON, then add the API and DB, finally add reservation expiry and concurrency testing.

Recommended Answers

All 6 Replies

Anyone? please

Do you need some help in designing? or in code? Its really complex to discuss it here.
Maybe we could collaborate.... PM me!

i think designing is ok right because i can simply edit it in myself, the tough part is the javascript

this is a database problem.
how good are your mysql / php skills

n00b , frankly speaking, i never did that before :(

I see.... but you see it's a process... it's not that simple as "here is I want to see" boom.... result. drjohn has a point.
there is a database involved. The HTML you attached is not that helping also. it's too plain to decide where you will be going. =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.