I have a page that allows users to choose from checkboxes, each with text next to the three checkbox options. If users don't choose from one of the checkboxes then i don't want the text to appear on the next page. But if others have been chosen i want them to show. Maybe i need another elseif in the statement.
Any help cheers?!?!
Code:
$res= mysql_query("SELECT * FROM survey WHERE rtid=1 ORDER BY id");
$num= mysql_num_rows($res);
echo"<tr>";
echo"<td><strong>1 - Operational</strong><td>";
echo"</tr>";
for ($i=0; $i<$num; $i++) {
// Fetch data from survey table here
$row= mysql_fetch_array ($res);
$s='';
$t='';
$u='';
$array_name= 'myradio'.$row['id'];
if (isset($POST[$array_name])) {
foreach ($POST[$array_name] as $key => $val) {
if ($val=='Currently In Place') $s='X';
else if ($val=='Required Essential') $t='X';
else if ($val=='Required-Recommended') $u='X';
}
}
// echo table cells with requirement_txt, $s, $t, and $u, here
echo "<tr>";
echo "<td>{$row['requirement_txt']}</td>";
echo "<td><center><strong>$s</center></strong></td>";
echo "<td><center><strong>$t</center></strong></td>";
echo "<td><center><strong>$u</center></strong></td>";
echo "<td>Module 1</td>";
echo "</tr>";
}