D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
markniuj
/
bazmeasar.com
/
admin
/
Filename :
edit_pdf.php
back
Copy
<?php include "../config.php"; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Add audio Files</title> <link rel="stylesheet" href="css.css"> </head> <body> <header> <div class="logo"><img src="logo.png"></div> </header> <div class="mainbody"> <div class="bodyarea"> <div class="dextop"> <h1>Edit PDF Record</h1> <?php // Check if an ID is provided in the URL if (isset($_GET['id'])) { $id = $_GET['id']; // Retrieve the PDF record based on the provided ID $sql = "SELECT * FROM pdf_books WHERE id = $id"; $result = $conn->query($sql); if ($result->num_rows == 1) { $row = $result->fetch_assoc(); ?> <form action="update_pdf.php" method="POST"> <input type="hidden" name="id" value="<?php echo $row['id']; ?>"> <label for="book_name">Book Name:</label> <input type="text" name="book_name" value="<?php echo $row['book_name']; ?>" required><br><br> <label for="book_author">Book Author:</label> <input type="text" name="book_author" value="<?php echo $row['book_author']; ?>" required><br><br> <label for="description">Description:</label> <textarea name="description" rows="4" required><?php echo $row['description']; ?></textarea><br><br> <label for="pdf_category">PDF Category:</label> <input type="text" name="pdf_category" value="<?php echo $row['pdf_category']; ?>" required><br><br> <input type="submit" value="Update PDF"> </form> <?php } else { echo "Record not found."; } // Close the database connection $conn->close(); } else { echo "Invalid request. Please provide a valid record ID."; } ?> <footer> <a href="https://webograph.pk/">Site BY Webograph.pk</a> </footer> </body> </html>