tail Posted January 12, 2010 Share Posted January 12, 2010 I'm trying to create a script to add music to a database. Currently I'm using ID3tag to get the ID3 information from the MP3. The way I have the form set up is like this: When Auto-Fill is clicked, the script detects it and the ID3 information is echoed to the form, like this: However, the file is obviously no longer in the input. I tried to overcome this by making a hidden form field with a value of $_FILES['file']['tmp_name'] but it didn't work. I don't know AJAX or how it works, but it seems that perhaps it would be possible to send the $_FILES['file']['tmp'] variable to an external script that gets the ID3 information from the ID3 class, and then returns the values to the form. Yes? No? Please help. Link to comment https://forums.phpfreaks.com/topic/188132-autofill-with-information-from-_files/ Share on other sites More sharing options...
dhvani Posted January 12, 2010 Share Posted January 12, 2010 Hi, I am not sure but As per my knowledge without posting the form you are not able to get the value using $_FILES['file']['tmp_name']. May i know how you are getting other columns like title, artist ,.... . Link to comment https://forums.phpfreaks.com/topic/188132-autofill-with-information-from-_files/#findComment-993313 Share on other sites More sharing options...
tail Posted January 12, 2010 Author Share Posted January 12, 2010 I'm using code from this project: getID3 Here is the code: require_once('/var/www/getid3/getid3.php'); $getid3 = new getID3; $file=$_FILES['file']['tmp_name']; $id3 = $getid3->analyze($file); getid3_lib::CopyTagsToComments($id3); $cbr=($id3['audio']['bitrate_mode'] == 'cbr') ? ' CBR' : ''; $id3['audio']['bitrate']=round($id3['audio']['bitrate']/1000).'kbps'.$cbr; $length=explode(':',$id3['playtime_string']); Link to comment https://forums.phpfreaks.com/topic/188132-autofill-with-information-from-_files/#findComment-993500 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.