Gestionnaire de fichiers - Editer - /home/kridsana/webapp.cm.in.th/663012803/u66301280045/PHP สอบ/del.php
Arrière
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=, initial-scale=1.0"> <title>Document</title> </head> <body> <?php include("db.php"); $book_id=$_GET['book_id']; echo "ลบข้อมูล $book_id"; // sql to delete a record $sql = "DELETE FROM books WHERE book_id='$book_id' "; if ($conn->query($sql) === TRUE) { echo "Record deleted successfully"; header( "location: index.php" ); } else { echo "Error deleting record: " . $conn->error; } ?> <form action="delete.php" method="GET" onsubmit="return confirm('คุณต้องการลบข้อมูลนี้ใช่หรือไม่?');"> <input type="hidden" name="book_id" value="<?= $book_id ?>"> <button type="submit">ลบหนังสือ</button> </form> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Génération de la page: 0.13 |
proxy
|
phpinfo
|
Réglages