Advertisement
Guest User

Untitled

a guest
May 25th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.50 KB | None | 0 0
  1. <html>
  2.     <head>
  3.     <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">
  4.     </head>
  5.     <body>
  6.         <button><a href="elimina.php">ELIMINA VISITE</a></button><br>
  7.         <button><a href="logout.php">LOGOUT</a></button><br>
  8.     </body>
  9. </html>
  10. <?php
  11.  session_start();
  12.     echo "Pagina dell'admin<br>";
  13.     echo "Qui puoi inserire le visite";
  14.     $hostname="localhost";
  15.     $username="root";
  16.     $password="";
  17.     $db="sitomedico";
  18.     $connessione=mysqli_connect($hostname, $username, $password, $db) or die("Errore di connessione<br>");
  19.    
  20.     $strSQL="SELECT * FROM visite";
  21.     $query=mysqli_query($connessione, $strSQL);
  22.     if(!$query){
  23.         echo "Errore nella query";
  24.         exit();
  25.     }
  26.     echo"Queste sono le visite già presenti";
  27.     $riga= mysqli_fetch_array($query);
  28.     echo('<table border=1>');
  29.     echo('<tr>
  30.            <th>Seleziona</th>
  31.           <th>N. Visita</th>
  32.           <th>Data</th>
  33.           <th>Ora</th>
  34.            <th>Note</th>
  35.            <th>Effettuata</th>
  36.            <th>Id Paziente</th>
  37.            <th>Id Medico</th>
  38.            <th>Id Prestazione</th>
  39.         </tr>');
  40.    
  41.     while($riga){
  42.         echo("<tr>");
  43.         echo("<td>".$check."</td>");
  44.         echo("<td>".$riga["num_vis"]."</td>");
  45.         echo("<td>".$riga["data"]."</td>");
  46.         echo("<td>".$riga["ora"]."</td>");
  47.         echo("<td>".$riga["note"]."</td>");
  48.         echo("<td>".$riga["effettuata"]."</td>");
  49.         echo("<td>".$riga["id_paz"]."</td>");
  50.         echo("<td>".$riga["id_med"]."</td>");
  51.         echo("<td>".$riga["id_pre"]."</td>");
  52.         echo("</tr>");
  53.         $riga=mysqli_fetch_array($query);
  54.     }
  55.    
  56.     $pazienti="Select id_paz from pazienti";
  57.     while($row=mysqli_fetch_assoc($query))
  58.     echo("<select name='paziente' action='post'>
  59.             <option value=".$pazienti['id_paz']"></option>
  60.         </select>");
  61.        
  62.     /*echo"<form name='form' method='post' action=''>
  63.         Data<input type='data' name='data'><br>
  64.         Ora <input type='int' name='ora'><br>
  65.         Note <input type='text'name='note'><br>
  66.         Effettuata <input type='checkbox' name='si'>Si
  67.                   <input type='checkbox' name='no'>No<br>                  
  68.         Id Paziente <select name='paziente' action='post'>
  69.                         <option value=".$pazienti['id_paz']"></option>
  70.                     </select>
  71.         </form>";
  72.         /*Id Medico <select name=''>
  73.                         <option value=''></option>
  74.                     </select>
  75.         Id Prestazione <select name=''>
  76.                             <option value=''></option>
  77.                         </select>
  78.         ";*/
  79.  
  80.     */
  81.  
  82.  
  83. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement