Cambiata pagina index lista consumer da form con select a tabella
This commit is contained in:
13
index.php
13
index.php
@@ -62,14 +62,15 @@ $result = mysqli_query($conn, $sql);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!isset($_GET["customerId"]) && !isset($_GET["orderId"])){
|
if(!isset($_GET["customerId"]) && !isset($_GET["orderId"])){
|
||||||
echo "<form method='GET' action='index.php'>";
|
echo "<table>";
|
||||||
echo "<select id='customerId' name='customerId'>";
|
|
||||||
while ($row = mysqli_fetch_assoc($result)) {
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
echo "<option value='" . $row['CustomerID'] . "'>" . $row['CustomerID'] . " - " . $row['CustomerName'] . "</option>";
|
echo "<tr>";
|
||||||
|
echo "<td>" . $row['CustomerID'] . "</td>" ;
|
||||||
|
echo "<td>" . $row['CustomerName'] . "</td>" ;
|
||||||
|
echo "<td><a href='index.php?customerId=" . $row['CustomerID'] . "'>Visualizza Ordini</a></td>" ;
|
||||||
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
echo "</select>";
|
echo "</table>";
|
||||||
echo "<input type='submit' value='Visualizza Ordini'>";
|
|
||||||
echo "</form>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user