D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
markniuj
/
bazmeasar.com
/
Filename :
searched.php
back
Copy
<?php include 'config.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>search </title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="" name="keywords"> <meta content="" name="description"> <!-- Favicon --> <link href="img/favicon.ico" rel="icon"> <!-- Google Web Fonts --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Barlow:wght@600;700&family=Ubuntu:wght@400;500&display=swap" rel="stylesheet"> <!-- Icon Font Stylesheet --> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet"> <!-- Libraries Stylesheet --> <link href="lib/animate/animate.min.css" rel="stylesheet"> <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet"> <link href="lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" /> <!-- Customized Bootstrap Stylesheet --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- Template Stylesheet --> <link href="css/style.css" rel="stylesheet"> <style> .embed-responsive iframe { width: 100%; /* Adjust the width as needed */ height: 100%; /* Adjust the height as needed */ } </style> </head> <body> <!-- Spinner Start --> <!-- Spinner End --> <!-- Topbar Start --> <!-- Topbar End --> <!-- Navbar Start --> <?php include 'include/menu.php';?> <!-- Navbar End --> <!-- search Start --> <?php // Database connection parameters (same as before) include 'config.php'; // Check if a search query is submitted if (isset($_GET['query'])) { $search_query = $_GET['query']; // Query to search for audio records by English title $query = "SELECT * FROM audio_files WHERE english_title LIKE '%$search_query%'"; $result = $conn->query($query); // Store matching audio records in an array if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $audio_records[] = $row; } } } // Close the database connection $conn->close(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Search Audio Records by English Title</title> <link rel="stylesheet" href="css/css.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <body> <header> </header> <div class="mainbody"> <div class="bodyarea"> <h1>Search Audio Records by English Title</h1> <!-- Search form --> <form method="get" action="searched.php"> <input type="text" name="query" placeholder="Type bayan title" value="<?php echo $search_query; ?>"> <input type="submit" value="Search"> </form> <!-- Display search results in a table --> <?php if (!empty($search_query)) { if (count($audio_records) > 0) { echo "<h2>Search Results:</h2>"; echo "<table border='1'>"; echo "<tr><th>English Title</th><th>اردو عنوان</th > <th>View Details</th> </tr>"; foreach ($audio_records as $record) { $audio_id = $record["id"]; $urdu_title = $record["urdu_title"]; $english_title = $record["english_title"]; echo "<tr>"; echo "<td><a href='details.php?id=$audio_id'>$english_title</a></td>"; echo "<td><a href='details.php?id=$audio_id'>$urdu_title</a></td>"; echo "<td><a href='details.php?id=$audio_id'>View Details</a></td>"; echo "</tr>"; } echo "</table>"; } else { echo "No results found for your search."; } } ?> </div> </div> </div> <!----search end --> <!-- Footer Start --> <?php include 'include/footer.php';?> <!-- Footer End --> <!-- Back to Top --> <a href="#" class="btn btn-lg btn-primary btn-lg-square back-to-top"><i class="bi bi-arrow-up"></i></a> <!-- Add Bootstrap JS and jQuery --> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <!-- JavaScript Libraries --> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script> <script src="lib/wow/wow.min.js"></script> <script src="lib/easing/easing.min.js"></script> <script src="lib/waypoints/waypoints.min.js"></script> <script src="lib/counterup/counterup.min.js"></script> <script src="lib/owlcarousel/owl.carousel.min.js"></script> <script src="lib/tempusdominus/js/moment.min.js"></script> <script src="lib/tempusdominus/js/moment-timezone.min.js"></script> <script src="lib/tempusdominus/js/tempusdominus-bootstrap-4.min.js"></script> <!-- Template Javascript --> <script src="js/main.js"></script> </body> </html>