D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
root
/
home
/
markniuj
/
bazmeasar.com
/
admin
/
Filename :
add_form.php
back
Copy
<?php // Database connection parameters include "../config.php"; // Establish a database connection $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Retrieve the audio file's ID from the query string if (isset($_GET['id']) && is_numeric($_GET['id'])) { $audio_id = $_GET['id']; // Query to select the specific audio file $query = "SELECT * FROM audio_files WHERE id = $audio_id"; $result = $conn->query($query); if ($result && $result->num_rows > 0) { // Fetch audio file details $row = $result->fetch_assoc(); $english_title = $row["english_title"]; $audio_filename = $row["audio_filename"]; $image_filename = $row["image_filename"]; $hits = $row["hits"]; } else { echo "Audio file not found."; } } else { echo "Invalid audio file ID."; } // Close the database connection $conn->close(); ?> <!DOCTYPE html> <html> <head> <title><?php echo $audio_filename; ?></title> </head> <body> <form action="upload.php" method="post" enctype="multipart/form-data"> <label for="audio">Audio:</label> <input type="file" name="audio" accept="audio/*" required><br> <label for="image">Image:</label> <input type="file" name="image" accept="image/*" required><br> <label for="urdu_title">Urdu Title:</label> <input type="text" name="urdu_title"placeholder="urdu title" required><br> <label for="english_title">English Title:</label> <input type="text" name="english_title" required><br> <label for="details">Details:</label> <textarea name="details" rows="4" required></textarea><br> <label for="category">Category:</label> <select name="category" required> <option value="Bayan"></option> <option value="Quran">Quran</option> <option value="Naat">Naat</option> <option value="Ashar">Ashar</option> <!-- Add more category options as needed --> </select><br> <label for="speaker">Speaker:</label> <select name="speaker" required> <option value="Hzarat Maulana Shaheen Iqbal Asar sahib">Hzarat Maulana Shaheen Iqbal Asar sahib</option> <option value="Qari Abdur Rehman Sudais">Qari Abdur Rehman Sudais</option> <option value="Naat Khuwan">Naat Khuwan</option> <!-- Add more speaker options as needed --> </select><br> <input type="submit" value="Upload"> </form> </body> </html>