loop based on a SELECT query... so, depending on the result of the
query, you could have 1 row, or 3 rows, or 5 rows, or 100 rows. the
1st column is a checkbox, the 2nd and 3rd columns have a value from
the SELECT. now what i want the user to be able to do, is go down
through there and check whichever checkbox(s) they want. the thing
is, since this is done in a loop, the checkbox always has the same
name. when they submit, how do i determing which box(s) they checked
because right now, all i'm getting is the value of the 1st checkbox?
NOTE: there is a place where i do an echo $htmlmessage, as well as a submit button, i figure that's a given - but just wanted to make a note.
//sample code to create the table with checkbox
Code: Select all
<?php
$id = $_REQUEST['someID'].
$getval = OCIParse($Link, "SELECT COLUMN1, COLUMN2 FROM TABLE WHERE ID = '$id'");
OCIDefineByName($getval, "COLUMN1", $col1);
OCIDefineByName($getval, "COLUMN2", $col2);
$htmlmessage = "<table border='1'><tr><td>CHECKBOX</td><td>COLUMN1</td><td>COLUMN2</td></tr>";
while (OCIFetch($getval)) {
$htmlmessage .= "<tr><td align='center'><input type='checkbox' name='chkbox' value='1'></td><td>" . $col1 . "</td><td>" . $col2 . "</td></tr>";
}
$htmlmessage .= "</table>";
?>