Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'outdb.php';
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>RUBRICA</title>
- <script src="https://kit.fontawesome.com/db10c92754.js" crossorigin="anonymous"></script>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <style>
- table {
- border-collapse: collapse;
- border-spacing: 0;
- width: 100%;
- border: 1px solid #ddd;
- }
- th, td {
- text-align: left;
- padding: 8px;
- }
- tr:nth-child(even){background-color: #f2f2f2}
- </style>
- </head>
- <body>
- <div align="right">
- <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>
- </div>
- <h2>RUBRICA</h2>
- <div style="overflow-x:auto;">
- <table>
- <tr>
- <th>AZIONE</th>
- <th>COGNOME</th>
- <th>NOME</th>
- <th>EMAIL</th>
- <th>TELEFONO</th>
- </tr>
- <?php
- for($i=0;$i<$record;$i++){
- $row=@mysqli_fetch_array($result);
- ?>
- <tr>
- <td>
- <form action = 'modifica.php' method = 'get'>
- <?php echo '<a href="modifica.php?id='.$row['id'].'"> <i class="fas fa-user-edit"></i></a>';
- echo '<a href="#" onclick="popup('.$row['id'].')"> <i class="fas fa-trash-alt"></i></a>'; ?>
- </form>
- </td>
- <td>
- <?php
- echo $row['cognome'];
- ?>
- </td>
- <td>
- <?php
- echo $row['nome'];
- ?>
- </td>
- <td>
- <?php
- echo $row['email'];
- ?>
- </td>
- <td>
- <?php
- echo $row['telefono'];
- ?>
- </td>
- </tr>
- <?php
- }
- ?>
- </div>
- </table>
- <script>
- function popup(id){
- if(confirm("CONFERMI L'ELIMINAZIONE")){
- location.href='eliminazione.php?id=' + id;
- }else{
- location. href='index.php';
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement