I have two pages. On one users can choose from 3 radio buttons for a certain category. When submit is clicked a new page is loaded with a table showing which radio button has been clicked by putting an "X" in the correct cell.
My problem is that on my first page I have several separate tables and buttons instead of choosing from one, I then would like these results displayed in one table with the different "X"'s in the cells depending on what has been chosen.
Code for first page:
$productsql = "SELECT * FROM survey WHERE rtid=1";
$productResults = mysql_query($productsql);
while ($productRow = mysql_fetch_array ($productResults)){
$ProductName = $productRow["requirement_txt"];
//echo "<br>$ProductName";}
echo"
<FORM method='POST' action='form.php'>
<table border='1'>
<td>Requirement Type</td><td>Currently In Place</td><td>Required-Essential</td><td>Required-Recommended</td><tr>
<td>$ProductName</td>
<td><INPUT type='radio' name='myradio' value='Currently In Place' CHECKED></td>
<td><INPUT type='radio' name='myradio' value='Required Essential'></td>
<td><INPUT type='radio' name='myradio' value='Required-Recommended'></td>
</tr>
<p>
<INPUT type='submit' name='mybutton' value='Submit'>
</FORM>";}
Code for second page:
if($POST['myradio'] == "Currently In Place") {
$s= "X";
}
elseif($POST['myradio'] == "Required Essential") {
$t = "X";
}
else {
$u= "X";
}
echo"<table border='1'><td>Requirement Type</td><td>Currently In Place</td><td>Required-Essential</td><td>Required-Recommended</td><td>i-Clean Solution</td><tr>
<td>test</td><td><center><strong>$s</strong</center></td><td><center><strong>$t</strong></center></td><td><center><strong>$u</strong></center></td><td>Module here</td>";
The link is www.ecsonline.co.uk/form1.php