Need your help in PHP/SQL so i have a select box that it works well but what i need is when i select something i need to have the whole parameter related to my selection in a multiple selection box for example if i select router 1
i have in router 1 interface 1
interface 2
interface 3
so i want to select one of these interfaces of router 1 and have the result of selection in a box for example like this router 1 : interface 1
This is my php code of the first selection:
$query = "SELECT nom FROM collectes";
// Execute it, or let it throw an error message if there's a problem.
$stmt = $pdo->query( $query );
$dropdown = "<select name='collectes'>";
foreach ($stmt as $row) {
$dropdown .= "\r\n<option value='{$row['nom']}'>{$row['nom']}</option>";
}
$dropdown .= "\r\n</select>";
echo $dropdown;