adding hidden input value inside option
Posted: Tue Nov 19, 2013 10:05 am
hello everyone im new here i have problem adding hidden input value inside option in php it is showing [img]file:///C:/WebDev%20Structures/Untitled.png[/img] only the first doctor added is inside the option, why? the input type is text and i'll just hide it if im successful, it is' printing the correct value but i just cant put the doctors inside the option aside from the 1st one added
Code: Select all
<?php echo "<select name=dentist><option name=dentist> - Select Dentist -";echo"</option>";
$ressss = mysql_query("select * from dentists");
$rowwww = mysql_num_rows($ressss);
for($i=0;$i<$rowwww;$i++){
echo"<option name=dentist>Dr. " .mysql_result($ressss,$i,"denfname").' '.mysql_result($ressss,$i,"denlname");
echo "<input type='text' name='denid' value=".mysql_result($ressss,$i,"denid").">";
}?>