I am a nyophyte to PHP, and I've seen this answered so many different ways that it is confusing.
I have a combobox that is dynamically populated from a MySQL table ACTIVE in a database AIRCRAFT. Based on the selected AIRCRAFTREGISTRATION value from the combobox, I want to find and display the value from a column in the same table labeled USEABLESEATS for the record with that AIRCRAFTREGISTRATION.
Here is the code combobox:
<select name="AssignAircraft" size="1" id="AssignAircraft" style="position:absolute;" <?php
$mysqli = NEW MySQLi('hostname','User','Password','AIRCRAFT');
$resultSet = $mysqli->query("SELECT AIRCRAFTREGISTRATION FROM ACTIVE");
?>
<SELECT NAME="ACTIVE">
<?php
while($rows = $resultSet->fetch_assoc())
{
$acreg = $rows['AIRCRAFTREGISTRATION'];
echo "<option value='$acreg'>$acreg</option>";
}
?>
</SELECT>>