i have a table which is populated with data in a table in PHP tags the first column creates ratio buttons with the value assign from the table field, my problam is when iclik the submit button all the value in the <form> tag can be retrieved but not the value of the radio button using
$jobno=$_POST['optSelected'];
i think, i don't know, it's because of the table not created with the <form> tags.
can anyone solve this problam please
<html>
Code: Select all
<?php
include('Conn.php');
$sql="Select entered,jobno,ffrom,keyword,message from tblcomplaints where completed='N' order by jobno LIMIT 10";
$uqery=mysql_query($sql) or die('some error occured while querung the database.');
echo "<div id='Layer1' style='position:absolute; left:50px; top:140px; width:1500px; height:142px; z-index:1; '> ";
echo "<table border=0 bordercolor='#DEE3E7' cellpadding=0 id='data'>";
echo "<tr bgcolor='#DEE3E7' >";
echo "<font size=2>";
echo "<th width='5' >se";
echo "<th width='50' >Date";
echo "<th width='60'>Job No";
echo "<th width='150'>From";
echo "<th width='100'>keyword";
echo "<th width='360'>Message";
echo"</tr>";
$count=0;
while($rows=mysql_fetch_row($uqery)){
echo "<tr bgcolor='E2F3F1' >";
echo "<font size=1> ";
echo "<td height='5' ><input name='optSelected' type='radio' value='.$rows[0].' onclick='javascript:showValue()' ></td>";
echo "<td height='5' >".$rows[0]."</td>";
echo "<td height='5'>".$rows[1]."</td>";
echo "<td height='5'>".$rows[2]."</td>";
echo "<td height='5'>".$rows[3]."</td>";
$message= substr($rows[4],0,48);
echo "<td height='5'>".$message."</td>";
echo "</font>";
echo "</tr>";
$count=$count+1;
}
echo "</table>";
echo "</div>";
?><body>
<form action="assignBack.php" method="post" name="shiran">
<input type="submit" name="cmdOK" value="SAVE" >
</form>
</body>
</html>