Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1.  
  2.  
  3. <?php
  4. include 'outdb.php';
  5. ?>
  6.  
  7. <!DOCTYPE html>
  8. <html>
  9. <head>
  10. <title>RUBRICA</title>
  11. <script src="https://kit.fontawesome.com/db10c92754.js" crossorigin="anonymous"></script>
  12. <meta name="viewport" content="width=device-width, initial-scale=1">
  13. <style>
  14. table {
  15. border-collapse: collapse;
  16. border-spacing: 0;
  17. width: 100%;
  18. border: 1px solid #ddd;
  19. }
  20.  
  21. th, td {
  22. text-align: left;
  23. padding: 8px;
  24. }
  25.  
  26. tr:nth-child(even){background-color: #f2f2f2}
  27. </style>
  28. </head>
  29. <body>
  30.  
  31.  
  32. <div align="right">
  33. <p><a href="add.php" target="_self" title="Inserisci Dati"><input name="button" value="Inserimento Anagrafica" style=" style=" color:#007fff; background-color: #00CC00;" type="submit"></a></p>
  34. </div>
  35.  
  36.  
  37. <h2>RUBRICA</h2>
  38.  
  39. <div style="overflow-x:auto;">
  40. <table>
  41. <tr>
  42. <th>AZIONE</th>
  43. <th>COGNOME</th>
  44. <th>NOME</th>
  45. <th>EMAIL</th>
  46. <th>TELEFONO</th>
  47. </tr>
  48.  
  49.  
  50. <?php
  51. for($i=0;$i<$record;$i++){
  52. $row=@mysqli_fetch_array($result);
  53. ?>
  54. <tr>
  55. <td>
  56. <form action = 'modifica.php' method = 'get'>
  57. <?php echo '<a href="modifica.php?id='.$row['id'].'"> <i class="fas fa-user-edit"></i></a>';
  58. echo '<a href="#" onclick="popup('.$row['id'].')"> <i class="fas fa-trash-alt"></i></a>'; ?>
  59. </form>
  60. </td>
  61. <td>
  62. <?php
  63. echo $row['cognome'];
  64. ?>
  65. </td>
  66. <td>
  67. <?php
  68. echo $row['nome'];
  69. ?>
  70. </td>
  71. <td>
  72. <?php
  73. echo $row['email'];
  74. ?>
  75. </td>
  76. <td>
  77. <?php
  78. echo $row['telefono'];
  79. ?>
  80. </td>
  81. </tr>
  82. <?php
  83. }
  84. ?>
  85.  
  86. </div>
  87. </table>
  88.  
  89. <script>
  90.  
  91. function popup(id){
  92. if(confirm("CONFERMI L'ELIMINAZIONE")){
  93.  
  94. location.href='eliminazione.php?id=' + id;
  95. }else{
  96. location. href='index.php';
  97. }
  98. }
  99. </script>
  100.  
  101.  
  102.  
  103. </body>
  104.  
  105. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement