Please help, so I have this combobox in html/php, So I want to load the records from mysql to a combobox, I had done that, so when the user selects a record in combobox, how can i get the selected value in the combobox?? Please guide me. I'm new in web.
so this is my table
<tr>
<td></td>
<td><?php include('cboProject.php'); ?></td>
</tr>
cboProject.php(getting records from mysql)
$sql=mysql_query("SELECT DISTINCT pcode, projid FROM projb");
echo "<select name='pcode'>";
echo "<option>-- Select Project --</option>";
while ($row = mysql_fetch_array($sql))
echo "<option value='$row[projid]'>$row[pcode]</option>";
echo "</select>";
So when the user selects from a combobox. how will I get the id?? Please guide me. I really do not know what's next. Am I doing it right? Thank you so much for the help.