Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
- </head>
- <body>
- <button><a href="elimina.php">ELIMINA VISITE</a></button><br>
- <button><a href="logout.php">LOGOUT</a></button><br>
- </body>
- </html>
- <?php
- session_start();
- echo "Pagina dell'admin<br>";
- echo "Qui puoi inserire le visite<br>";
- $hostname="localhost";
- $username="root";
- $password="";
- $db="sitomedico";
- $connessione=mysqli_connect($hostname, $username, $password, $db) or die("Errore di connessione<br>");
- $strSQL="SELECT * FROM visite";
- $query=mysqli_query($connessione, $strSQL);
- if(!$query){
- echo "Errore nella query";
- exit();
- }
- echo"Queste sono le visite già presenti";
- $riga= mysqli_fetch_array($query);
- echo('<table border=1>');
- echo('<tr>
- <th>N. Visita</th>
- <th>Data</th>
- <th>Ora</th>
- <th>Note</th>
- <th>Effettuata</th>
- <th>Id Paziente</th>
- <th>Id Medico</th>
- <th>Id Prestazione</th>
- </tr>');
- while($riga){
- echo("<tr>");
- echo("<td>".$riga["num_vis"]."</td>");
- echo("<td>".$riga["data"]."</td>");
- echo("<td>".$riga["ora"]."</td>");
- echo("<td>".$riga["note"]."</td>");
- echo("<td>".$riga["effettuata"]."</td>");
- echo("<td>".$riga["id_paz"]."</td>");
- echo("<td>".$riga["id_med"]."</td>");
- echo("<td>".$riga["id_pre"]."</td>");
- echo("</tr>");
- $riga=mysqli_fetch_array($query);
- }
- $pazienti="Select id_paz from pazienti";
- while($row=mysqli_fetch_assoc($query))
- echo("ciao <select name='paziente' action='post'>
- <option value=".$pazienti['id_paz']."></option>
- </select>");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement