I have a form, one of the fields is a dropdown that does query and brings the results as below:
<select name="convenio" id="convenio" class="input" style="width:260px">
<option value="selecione"><--- Selecione uma opção ---> </option>
<? while (($exibe = oci_fetch_array($parsed_conv, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
$CD_CONVENIO = $exibe ['CD_CONVENIO'];
$DS_CONVENIO = $exibe ['DS_CONVENIO'];
?>
<option value="<?=$CD_CONVENIO?>"><?=$DS_CONVENIO?></option>
<? } ?>
</select>
I have the results expected in the form.
Once filled, in a method post, I send the form data to another page.
On this other page, I get the field information up as follows:
$NM_CONVENIO = $_POST['convenio'];
This variable $NM_CONVENIO
is receiving the data from column CD_CONVENIO
, I do not want this, I want it to receive the description of this sequence, that is, another column, the DS_CONVENIO
displayed on the form. How can I do this?