Hi friends here is me with another issue
i have practicing about file upload, my script working with images perfectly but if i choose mp3 audio file its not moving to the directory which i have specified in my code
here is my code
<?php
include ("header.html");
require ("config.php");
error_reporting(E_ALL);
$audio_title = $_POST['audio_title'];
$audio_detail = $_POST['audio_detail'];
$audio_filename = md5($_FILES['mp3file']['name']);
$tmp_file = $_FILES['mp3file']['tmp_name'];
$file_path = "./upload/".$audio_filename;
$moveResult = move_uploaded_file($tmp_file, $file_path);
if ($moveResult == true) {
echo "File has been moved from " . $tmp_file . " to" . $file_path."<br />";
} else {
echo "ERROR: File not moved correctly<br />";
}
mysql_query("INSERT INTO songs (song_title, song_detail, song_url) VALUES('$audio_title', '$audio_detail', '$audio_filename')");
// echo "The Mp3 File ".$audio_filename." Has Been Successfull Uploaded.<br />";
echo "Upload another file <a href='mp3upload.php'>Click Here</a>";
include ("footer.html");
?>