Hello, I am currently working on a website in which I have checkboxes to select attendance for brainstorming sessions. Currently, you can select multiple checkboxes, but the last one I want to be an option to not attend any sessions. The problem is that I want to deselect or otherwise 'invalidate' the checks on the previous checkboxes if the user checks the last one. Is there anyway to do this? I'm running an AMP server and would prefer not to use javascript, but will if I have to.
Thank you
[PHP]<p><span>Below are Brainstorms which you have registered for or attended.</span></p>
</div>
<?php } ?>
<table border="0" align="left" cellpadding="0" cellspacing="0" class="table_search_frame" >
<tr>
<td class="table_search_title">Brainstorm Type</td>
<td class="table_search_title">Location</td>
</tr>
<tr>
<td class="table_search_item">
<select name="type" class="form_item" onChange="filterBrainstormType(this[this.selectedIndex].value);">
<option value="0">-- All Types --</option>
<option value="<?php echo B_PRO; ?>">» Professional Brainstorms</option>
<option value="<?php echo B_CS; ?>">» Community Service Brainstorms</option>
<option value="<?php echo B_TRAIN; ?>">» Training Session</option>
<option value="<?php echo B_EVENT; ?>">» Social Event</option>
</select>
</td>
<td class="table_search_item">
<select name="location" class="form_item" onChange="filterBrainstormLocation(this[this.selectedIndex].value);">
<?php
$sql = "SELECT * FROM `tbl_location`;";
$result = run_query($sql);
if($_SESSION['user_type'] == M_SUP)
{
echo "<option value=\"0\">-- All Locations --</option>";
for($i = 0; $i < mysql_num_rows($result); $i++)
{
$row = mysql_fetch_row($result);
if($row[0] == $_SESSION['user_location'])
echo "<option value=\"$row[0]\" selected>» $row[1] $row[2]</option>";
else
echo "<option value=\"$row[0]\">» $row[1] $row[2]</option>";
}
}
else
echo "<option value=\"".$_SESSION['user_location']."\">» ".getMemberLocationName($_SESSION['user_location'])."</option>";
?>
</select>
</td>
</tr>
</table>[/PHP]