Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- </head>
- <body>
- <?php
- $host = "localhost";
- $user = "root";
- $pass = "";
- $conn = @mysqli_connect($host, $user, $pass);
- if (mysqli_connect_errno())
- {
- die("Connessione fallita: " . mysqli_connect_error());
- }
- mysqli_select_db($conn, 'Esame_di_Stato');
- $query = "select Viaggiatore.Cognome,Viaggiatore.Nome,Località,Data_Partenza,Data_ritorno,Stato_Viaggio from Viaggio natural join
- Prenotazione natural join Viaggiatore where Viaggiatore.Cognome like “S%”";
- echo "<table border='2'>";
- echo "<tr><th>Viaggiatore Cognome</th><th>Viaggiatore Nome</th><th>Località</th><th>Data Partenza</th><th>Data ritorn</th><th>Stato
- Viaggio</th></tr>";
- $result = @mysqli_query($conn, $query);
- if(@mysqli_num_rows($result)!=0){
- while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)){
- echo "<form method='post' action='http://localhost/Esame_di_Stato' >";
- echo
- "<tr>
- <td><input type='text' name='Viaggiatore.Cognome' value='". $row["Viaggiatore.Cognome"] ."'' required></td>
- <td><input type='text' name='Viaggiatore.Nome' value='". $row["Viaggiatore.Nome"] ."'' required></td>
- <td><input type='text' name='Località' value='". $row["Località"] ."'' required></td>
- <td><input type='date' name='Data_Partenza' value='". $row["Data_Partenza"] ."'' required></td>
- <td><input type='date' name='Data_ritorno' value='". $row["Data_ritorno"] ."'' required></td>
- <td><input type='text' name='Stato_Viaggio' value='". $row["Stato_Viaggio"] ."'' required></td>
- </tr>";
- echo "</form>";
- }
- }
- echo "</table>";
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment