Advertisement
Guest User

Update foto

a guest
Oct 16th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. <?php
  2. include "includes/config.php";
  3. $query = mysqli_query($connection, "SELECT * FROM editfoto");
  4. ?>
  5.  
  6. <html>
  7. <head>
  8. <title>KATEGORI WISATA</title>
  9. </head>
  10. <body>
  11. <h2>MEMPERBAHARUI FOTO</h2>
  12. <table border="1">
  13. <thead>
  14. <tr>
  15. <th>No</th>
  16. <th>Kode Foto</th>
  17. <th>Nama Foto</th>
  18. <th>Kategori Kode</th>
  19. <th>Gambar Foto</th>
  20. <th>Action</th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. <?php if(mysqli_num_rows($query)>0)
  25. {?>
  26. <?php $nomor=1;
  27. while ($row = mysqli_fetch_array($query))
  28. {?>
  29. <tr>
  30. <th scope="row"><?php echo $nomor; ?></th>
  31. <td><?php echo $row["fotoKODE"];?></td>
  32. <td><?php echo $row["fotoNAMA"];?></td>
  33. <td><?php echo $row["kategoriKODE"];?></td>
  34. <td>
  35. <?php if($row['fotoNAMA']==""){ echo "<img src='iconfoto/noimage.png' width='88'/>";}else{?>
  36. <img src="iconfoto/<?php echo $row['fotoNAMA'] ?>" width="88" class="img-responsive" />
  37. <?php }?>
  38. </td>
  39. <td>
  40. <a href="updatefoto-form3.php?kodefoto=<?php echo $row["fotoKODE"]?>">EDIT</a>
  41. <a href="hapusfoto2.php?kodefoto=<?php echo $row["fotoKODE"]?>">DELETE</a>
  42. </td>
  43. </tr>
  44. <?php $nomor++; }?>
  45. <?php } ?>
  46. </tbody>
  47. </table>
  48. </body>
  49. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement