Dynamic List/Menu with 2 columns
I have created a Dynamic List/Menu box based on a recordset and showing me one field of that recordset ['Firmanaam'].
<?php
do {
?>
<option value="<?php echo $row_klantenselectie['Firmanaam']?>"><?php echo $row_klantenselectie['Firmanaam']?></option>
<?php
} while ($row_klantenselectie = mysql_fetch_assoc($klantenselectie));
$rows = mysql_num_rows($klantenselectie);
if($rows > 0) {
mysql_data_seek($klantenselectie, 0);
$row_klantenselectie = mysql_fetch_assoc($klantenselectie);
}
?>
First question what is the difference between 'values" and 'labels' in the creation box of the Dynamic List/menu as only the field entered in the 'labels" is shown in the listbox ?
Secondly I want to display two columns in the List box (one column with the client ID and one column with the clients name). How do I proceed ? Afterwards clicking on the selected client should send the client ID to another field in the form.
Thank you for your replies.
