Advertisement
Hydrase

Deletion EMP

Jun 7th, 2025
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9. <?php
  10. $ser=$_POST['s'];
  11. $conn=mysqli_connect('localhost','root',"","COLLEGE");
  12. if($conn->connect_error)
  13. {
  14. die("connection succesfull".$conn->connect_error);
  15. }
  16. $sql="DELETE FROM EMP WHERE EMPNO='$ser'";
  17. if(mysqli_query($conn,$sql)){
  18. echo "record deleted successfully";
  19. }
  20. else{
  21. echo "deletion failed";
  22. }
  23. $conn->close();
  24. ?>
  25. </body>
  26. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement