I need to create a form for this example in php. I need to have an unlimited number of seats with radio buttons next to each seat for the user to be able to select. BUT, when the user visits this page, it needs to pull the seats taken from the db and cross them out, rendering them inoperable without the radio button...
http://www.lanhorizon.com/step17.php
is there a way to do this? the logic seems easy, but actually making it work is another story...
This is pretty vague since we have no idea where you are. I'd approach it like this, though.
You know you have X seats. So you're going to first select all of the taken seats from the database (ordered by seat number) and fetch the first seat number. Then start looping from 1 to X. Within each loop, you check to see if the currently fetched seat number matches the seat number you're displaying. If it matches, then you display it crossed out and select the next row from the database. If it doesn't match, you display the seat number and the radio button.
Does that help?
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php