i have a table voucher
in my database pdodb
in this voucher
table i have a column named code
( text data ) and others infos_desc , info_sup , activite , lieu , operateur, tel_operateur
and i have a select displaying all the codes
<div class="select" style="width:200px;">
<?php
function load_desc()
{
$connect = mysqli_connect("localhost", "root", "root", "pdodb");
$output = '';
$sql = "SELECT * FROM voucher ORDER BY code";
$result = mysqli_query($connect, $sql);
while($row = mysqli_fetch_array($result))
{
$output .= '<option value="'.$row["id"].'">'.$row["code"].'</option>'; //
}
return $output;
}
?>
<p> Select Code
<select name="code" id="code">
<option value="">Select code </option>
<?php echo load_desc(); ?>
</select></p>
</div>
so i wonder if i can, when i'm clicking submitting a 'code' data, echo all the other column who are bind to this code?