Page 1 of 1

post problem with dynamically created option buttons

Posted: Mon Aug 07, 2006 6:39 am
by shiranwas
hi,,

i have a php page whih adds some data to a table from a database, in the table first column when the data adds it will be a option button with the value of the batabase field.
the table is creating fine but when i submit the value of the option button to anoter php page with post the value is not set what is the problem with my code pls ome one help me

Code: Select all

echo "<table>";

while($rows=mysql_fetch_row($uqery)){			

echo "<tr bgcolor='E2F3F1' onClick='alert()'>";							
echo "<font size=1>	";
echo "<td height='5'><input name='optSelected' type='radio' value='.$rows[0].'></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>";
echo "<td height='5'>".$rows[4]."</td>";
echo "</font>";
echo "</tr>";		
$count=$count+1;		
						
}								
echo "</table>";

shiran

Posted: Mon Aug 07, 2006 7:59 am
by volka
echo "<td height='5'><input name='optSelected' type='radio' value='.$rows[0].'></td>";
Take a closer look at this line. Especially the dots.

Tip: the syntax highlighter here made them red, while the dots in the following lines are not.