<html>
<head>
<title>Insert Song</title>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST"
enctype="multipart/form-data">
Select the Song : <input type="file" name="file">
<p><input type="submit" name="submit" value="submit"></p>
</form>
</body>
</html>
<?php
include("database.php");
if(isset($_POST['submit']))
{
$name = $_FILES['file']['name'];
echo $name;
$sql = mysql_query("insert into songs (name) values ('$name')");
if($sql)
{
echo "<br>inserted successfully";
}
else
{
echo "<br>not";
}
}
?>
Someone explain me how can i get details of a mp3 file(like name,artist,size,etc) in PHP from the code as written above.