D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
markniuj
/
.vscode-server
/
data
/
User
/
History
/
-c5465c2
/
Filename :
Y9RT.php
back
Copy
<?php include "../config.php"; ?> <!DOCTYPE html> <html> <head> <title>Delete PDF Record</title> <link href="table.css" rel="stylesheet"> <!-- You can link your CSS file here --> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <link href="css/.css" rel="stylesheet"> </head> <body> <h1>Delete PDF Record</h1> <?php // Check if an ID is provided in the URL if (isset($_GET['id'])) { $id = $_GET['id']; // Database details // Delete the PDF record based on the provided ID $sql = "DELETE FROM pdf_books WHERE id = $id"; if ($conn->query($sql) === TRUE) { echo "Record deleted successfully."; echo "<br>"; echo "<a href='index.php'><button>Go Back</button></a>"; } else { echo "Error deleting record: " . $conn->error; } // Close the database connection $conn->close(); } else { echo "Invalid request. Please provide a valid record ID."; } ?> </body> </html>