Multiple delete, deletes all data
Having an issue with multiple delete page. It will not recognize the check box field checked and deletes all data from the database. I made sure the checkbox value is set to 1. Seems like it's something simple I'm missing
<div id="wrapper">
<div id="header"><div id="logo"></div></div>
<div id="navi">
<table width="100%" border="0" cellpadding="0" cellspacing="0" ><tbody><tr><td><table width="100%" border="0" cellpadding="4" cellspacing="1" ><tr>
<td width="20%" style="text-align:center;"><a href="javascript:history.go(-1)">Go Back</a></td>
<td width="20%" style="text-align: center"><a href="../../userAdmin/myPanel.php">My Control Panel</a></td><td width="20%" style="text-align: center"><a href="">Public Control Panel</a></td>
<td width="20%" style="text-align: center"><a href="">Manage Team Rosters</a></td><td width="20%" style="text-align: center"><a href="../../userAdmin/LogOut.php">LogOut</a></td></tr></table></td></tr></tbody></table>
</div>
<div class="PageContent">
<h2>My Control Panel</h2>
<form action="" method="post">
<table width="600" border="1">
<tr>
<th width="325" scope="col"> </th>
<th width="212" scope="col"> </th>
<th width="41" scope="col"> </th>
</tr>
<?php
$wa_startindex = 0;
while(!$players->atEnd()) {
$wa_startindex = $players->Index;
?>
<tr>
<td><input type="hidden" name="wamultidelete_1[]" id="wamultidelete_1_<?php echo($wa_startindex); ?>" value="<?php echo($wa_startindex); ?>" />
<input name="player_name_<?php echo($wa_startindex); ?>" type="text" id="player_name_<?php echo($wa_startindex); ?>" value="<?php echo($players->getColumnVal("player_name")); ?>" size="32" /></td>
<td><input name="grad_<?php echo($wa_startindex); ?>" type="text" id="grad_<?php echo($wa_startindex); ?>" value="<?php echo($players->getColumnVal("grad")); ?>" /></td>
<td><input name="checkbox_<?php echo($wa_startindex); ?>" type="checkbox" id="checkbox_<?php echo($wa_startindex); ?>" value="1" /></td>
</tr>
<?php
$players->moveNext();
}
$players->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
<tr>
<td><input type="submit" name="Delete" id="Delete" value="Delete" /></td>
<td> </td>
<td> </td>
</tr>
</table>