0

How can i allow a user to select only 2checkboxes, if they choose more then 2an error message will appear saying you can only select 2, heres my code below where the checkboxes are used.

// Loop through data and display

while($a_row = mysql_fetch_assoc($result))
{
echo "<tr>".
	'<td style="color: black;"><input type="checkbox" name="bookings[]" value="'.$a_row['id'].'"></td>'.
	"<td style=\"color:Black\">".$a_row['Bookingdate']."</td>".
	"<td style=\"color:Black\">".$a_row['DayofWeek']."</td>".
2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by nav33n
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.