Thanks very much for that. Iunderstand how to put the values into a javascript array.
Another problem for the wiser out there.
These questons are all part of a project that I have in, in 2 days, and I have been stuck at the same point for about 2 weeks now.
The Javascript array I have is
function addSeat(value){
seatArray[value] = value
for (var j=0; j<=100; j++)
{
form2.write(seatArray[j].valu)
}
}
and the PHP code which displays the images is
<?php
$result = mysql_query($query_rstAvailSeats);
$x = 1;
echo '<table align="center"><tr>';
while($disp = mysql_fetch_array($result)){
if ($disp['seat_status'] == 'EMPTY')
{
echo '<td><img src="../Images/chair.jpg" onClick=addSeat(' . $disp['seat_number'] . ')>';
echo $disp['seat_number'];
}
else
{
echo '<td><img src="../Images/chairBooked.jpg" onClick=alert("Booked_Please")>';
echo $disp['seat_number'];
}
if($x%5==0){
echo '</tr>'."\n".
'<tr>'."\n";
}
if($x%25==0){
echo '</tr>'."\n".
'<tr></tr>'."\n".
'<tr>'."\n";
}
$x = $x+1;
}
echo '</tr>'."\n".
'</table>';
?>
With the seat_numbers stored in this array, lets say for example, seatArray[1] = 1, seatArray[2] = 2, seatArray[8] = 8. I need to then take these values when the user submits the form and change the database so the
seat_number = 1, seat_status = BOOKED
seat_number = 2, seat_Status = BOOKEd
seat_number = 3, seat_status = BOOKED
I know this might sound alot to ask for but I need alot of help.
Many Thanks to all that help