<pre lang="PHP"> $RowCt = 0; //Row Counter while($Row = mysql_fetch_assoc($Result)) { $k = $RowCt-1; $Table.= "<td><input id=\"chkbx".$RowCt."\" onclick=\"bindCheckbox(".$RowCt.", ".$idValues[$k].")\" type=\"checkbox\" name='chkbx[]' value=".$k.">"; //Loop thru each field foreach($Row as $field => $value) { $Table.= "<td nowrap=\"nowrap\">$value</td>"; } $Table.= "</tr>"; }
$doctorIds = $_POST['chkbx']; //echo $doctorname; //$q=select("SELECT * FROM `doctor` WHERE name = '$doctorname'"); //$doctorname=$q[0]['id']; //echo $doctorname; if (isset($doctorIds)||is_array($doctorIds)) { foreach ($doctorIds as $key => $i){ $b=execute_sql("INSERT INTO `doctorseller`(`doctorid`, `sellerid`) VALUES ('$i','$sellerid')"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)