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"])){
|
||||
echo "<form method='GET' action='index.php'>";
|
||||
echo "<select id='customerId' name='customerId'>";
|
||||
echo "<table>";
|
||||
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 "<input type='submit' value='Visualizza Ordini'>";
|
||||
echo "</form>";
|
||||
echo "</table>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user