I'm making an online reservation. User can choose empty seats to make reservation. Empty seats are green.gif and when user clicks on it, it changes yellow.gif and if user gives up that seats and wanna choose any others, he/she clicks on previously seats and they would be green again and choose anothers. I use php+apache+mysql trio. How can I find reserved seats to save them into database. Bye.
I can think of a couple of solutions...
1) Have a hidden input field which you add the reserved seat numbers to using the onClick handler of the image and when the form is submitted you will receive this information at the server.
Try this :
<form name="form1" action="yourPHPfile.php">
<img src="green.gif" onClick="toggleValue()">
<input type="hidden" name="reserve" value="0">