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($songtype=="Pakistani Songs")
	$sql="SELECT songname FROM songs WHERE songname='$fname'";
	if($num>0&&(file_exists("upload/".$fname)))  { 
	<script type="text/javascript">
	<?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>

maybe the type is audio/mpeg or application/octet-stream

you've got to try with different browsers to see how each one of them is sending the content.

another option is to check the first 2-3 bytes of the uploaded file if it is "ID3"
I checked a few mp3s I have and they start with ID3