Code:
if (!($uploaded_type=="audio/mp3")) {
echo "You may only upload MP3 files.<br>";
$ok=0;
} ^well doesnt this mean if you try to upload anything but mp3 it will return an error
and this is the upload part of my form
Code:
<?php
$target = "upload";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if ($uploaded_size > 7000000)
{
echo "Your file is too large.<br>";
$ok=0;
}
if($imageinfo['mime']!='audio/mp3'){
echo "We only accept mp3 music fies.";
$ok=o;
}
if ($uploaded_type =="text/php")
{
echo "No PHP files<br>";
$ok=0;
}
if ($ok==0)
{
Echo "";
}
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
}
?>