this is my code to upload mp3 files and necessary mp3 related inputs code,
how can i get this mp3 files cover photo from getid3 and save in relevant mysql db 'cover'
Please help me
PHP Code:
include 'connect.php';
if(isset($_POST['sub'])){
$t=$_POST['title'];
$a=$_POST['artist'];
$l=$_POST['lyrics'];
$m=$_POST['music'];
$c=$_POST['category'];
//code for mp3 uploading
if($_FILES['f1']['name']){
move_uploaded_file($_FILES['f1']['tmp_name'], "files/".$_FILES['f1']['name']);
$mp3path="../".$_FILES['f1']['name'];
$filepath="files/".$_FILES['f1']['name'];
$size = $_FILES['f1']['size'] /1024;
}
$i="insert into files(title,artist,cover,lyrics,music,mp3path,size,c ategory,filepath)values('$t','$a','$cv','$l ','$m','$mp3path','$size','$c','$filepath' )";
if(mysqli_query($con, $i)){
echo " Your Mp3 is Uploaded successfully..! <br/>";
}
}
how can i get this mp3 files cover photo from getid3 and save in relevant mysql db 'cover'
Please help me
Comment