So I have a mysql table for the charges of a hospital. My program currently only gets the price of the checked procedure. But now, I also want to get the procedure name when it is checked.
while($row = mysql_fetch_array($result)){
echo '
<tr>
<td>'.$row[0].'</td>
<td>'.$row[1].'</td>
<td>'.$row[2].'</td>';
$price=$row['price'];
echo '<td><input type="checkbox" name="er[]" value="'.$price.'"></td>';
echo "</tr>";
}
echo '</table>';
So basically I need to edit this part of the code:
$price=$row['price'];
echo '<td><input type="checkbox" name="er[]" value="'.$price.'">
It only gets the row for price. Can the value attribute have two values? I can't just make another checkbox cause that would be inappropriate.