D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
home
/
markniuj
/
bazmeasar.com
/
pdf
/
Filename :
books.php
back
Copy
<?php include "../config.php"; ?> <html lang="en"> <head> <meta charset="utf-8"> <title>index.php Bazm-e-Asar</title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="" name="keywords"> <meta content="" name="description"> <link href="css.css" rel="stylesheet"> <link href="css/table.css" rel="stylesheet"> </head> <?php // Fetch PDF books data from the database $query = "SELECT * FROM pdf_books"; $result = mysqli_query($conn, $query); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { $bookName = $row['book_name']; $description = $row['description']; $pdfCategory = $row['pdf_category']; $pdfFilename = $row['pdf_filename']; $downloadCounter = $row['download_counter']; // Display book information and download link echo "<div class='pdf-book'>"; echo "<h2>$bookName</h2>"; echo "<p>$description</p>"; echo "<p>Category: $pdfCategory</p>"; echo "<a href='pdfdownload.php?pdf=$pdfFilename'><i class='fa fa-download'></i> Download</a>"; echo "<p>Downloads: $downloadCounter</p>"; echo "</div>"; } } else { echo "No PDF books available."; } // Close the database connection ?>