this question might sound stupid but i really cannot think anymore. I've tried searching but to no avail. i'm new to this programming world and still learning. my situation is i have a seat layout made out of checkboxes and a database for record of seats reserved.
this is the database:
my plan is to check all checkboxes value against my database column 'reserved'. if they match, it will be disabled once the page load to indicate that the seats are taken.
to get the value from the database, below is my query:
SELECT reserved FROM et_seats WHERE event_id = '$theatre->id'
what i know now is to get the checkboxes disabled once the page load, i could use jquery. i don't really know about the rest.
i'm thinking about something like this. i dont know about the syntax but it is something like this.
jQuery(document).ready(function($){
$(this).find("input[type='checkbox']").attr('disabled','disabled');
}
can someone please help guide me to do what i plan to do? thanks
Aucun commentaire:
Enregistrer un commentaire