I wrote a code in php to upload mp3 files but it is not working. It uploads other file exrtensions but does not upload mp3 files. If I remove "if($_FILES=="audio/mp3"" then files is uploaded in database but not in the subfolder "upload". Can any one help me. I'll be thankful.
if($ftype=="audio/mp3")
{
if($songtype=="Pakistani Songs")
{
$sql="SELECT songname FROM songs WHERE songname='$fname'";
$result=mysql_query($sql);
$num=mysql_num_rows($result);
if($num>0&&(file_exists("upload/".$fname))) {
?>
<script type="text/javascript">
window.location.href="uploadform.php?flag=1";
</script>
<?php }
else {
$query="INSERT INTO songs (songname,singername,maname,songtype,filetype,filesize,uploaddate) VALUES ('$fname','$singer','$manameup','$songtype','$ftype','$fsize',NOW())";
mysql_query($query); ?>
<div align="center"><p2><?="File Uploaded Sucessfully"?></p2><br><a href="uploadform.php">Back</a></div>
<?php
move_uploaded_file($_FILES['audio']['tmp_name'],"upload/".$fname);
}
}
}