Basically, my question is this... Say the result of the query gives me 10 records...
Those are displayed in the table below... Notice the radio input and the hidden inputs.
I'm having trouble extracting JUST the value of the one record which I selected with the radio button... Is this not possible?
I should be able to select A radio button - and the POST from the form should give me just the results on the same row as the radio button I selected. I'm missing something though... Anybody care to clue me in?
Thanks,
Rich
Code: Select all
$class1="tableSmall";
$class2="tableTextSmall";
$row_count=0;
echo "<FORM method='post' action=''>";
for ($i=0; $i < $flts_num_rows; $i++) {
$availFlts = mysql_fetch_array($availFltsRslt);
$row_class=($row_count % 2) ? $class1 : $class2;
echo "<TR>";
echo "<TD align='center' class='".$row_class."'><INPUT type='checkbox' name='fltSelectї$i]' value='".$availFltsї'id']."'></TD>";
echo "<TD align='center' class='".$row_class."'>".$availFltsї'flightID']."<INPUT type='hidden' name='flightIDї$i]' value='".$availFltsї'flightID']."'></TD>";
echo "<TD align='center' class='".$row_class."'>".$availFltsї'origin']."<INPUT type='hidden' name='originї$i]' value='".$availFltsї'origin']."'></TD>";
echo "<TD align='center' class='".$row_class."'>".$availFltsї'originID']."<INPUT type='hidden' name='originIDї$i]' value='".$availFltsї'originID']."'></TD>";
$availdepї$i]=substr($availFltsї'departure'],0,-3);
echo "<TD align='center' class='".$row_class."'>".$availdepї$i]."<INPUT type='hidden' name='departureї$i]' value='".$availdepї$i]."'></TD>";
echo "<TD align='center' class='".$row_class."'>".$availFltsї'destination']."<INPUT type='hidden' name='destinationї$i]' value='".$availFltsї'destination']."'></TD>";
echo "<TD align='center' class='".$row_class."'>".$availFltsї'destinationID']."<INPUT type='hidden' name='destinationIDї$i]'
value='".$availFltsї'destinationID']."'></TD>";
$availarriveї$i]=substr($availFltsї'arrive'],0,-3);
echo "<TD align='center' class='".$row_class."'>".$availarriveї$i]."<INPUT type='hidden' name='arriveї$i]' value='".$availarriveї$i]."'></TD>";
echo "<TD align='center' class='".$row_class."'>".$availFltsї'distance']."<INPUT type='hidden' name='distanceї$i]' value='".$availFltsї'distance']."'></TD>";
echo "<TD align='center' class='".$row_class."'>".$availFltsї'aircraft']."<INPUT type='hidden' name='aircraftї".$i."]' value='".$availFltsї'aircraft']."'></TD>";
echo "<TD align='center' class='".$row_class."'><INPUT type='text' name='paxї$i]' size='1'></TD>";
echo "</TR>";
echo "<TR>";
echo "<TD><INPUT type='hidden' name='PID' value='".$pSelectї'PID']."'><INPUT type='hidden' name='hubIDї$i]' value='".$pSelectї'hubID']."'</TD>";
echo "</TR>";
$row_count++;
}
echo "<TR>";
echo "<TD colspan='11' align='center'><INPUT type='submit' name='submit' value='Select Flight'></TD>";
echo "</TR>";
echo "</FORM>";
echo "</TABLE>";