Advertisement
Hydrase

Delete.php

Jun 7th, 2025
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <html>
  2. <?php
  3. if(isset($_GET["bid"]))
  4. {
  5. $bid=$_GET["bid"];
  6.  
  7. $db=mysqli_connect("localhost","root","","BOOKS");
  8. $sql="delete from book_details where BOOKID=$bid";
  9. if($db->query($sql)===TRUE)
  10. {
  11. echo"<br>Record deleted successfully!<br>";
  12. }
  13. else
  14. {
  15. echo"<br>Error: ".$sql."<br>".$db->error;
  16. }
  17. }
  18. ?>
  19. <body>
  20. <form action="<?php $_PHP_SELF ?>" method="GET">
  21. BOOK ID:<input type="int" name="bid"><br>
  22. <input type="submit" name="submit">
  23. </form>
  24. <a href="index.php">go back</a>
  25. </body>
  26. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement