Based on 1 user-input field I want to populate multiple fields in a database table. See code below: I would like at assign $Relatienummer to hidden input field "relatienummer" and $Achternaam to "naam" and then submit. Any suggestions on how to do it?
<input value="" id="hidden_10" name="relatienummer" type="hidden" />
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Naam :</label>
<?php
$db =& JFactory::getDBO();
$query = "
SELECT *
FROM `Ledenbestand`
ORDER BY Achternaam";
$db->setQuery($query);
$rows = $db->loadObjectList();
?>
<select class="cf_inputbox validate-selection" id="select_11" size="1" title="" name="naam">
<?php
foreach ($rows as $row) {
echo "<option value='$row->Relatienummer'>$row->Achternaam $row->Relatienummer</option>";
}
?>
</select>
</div>
<div class="cfclear"> </div>
</div>