Jump to content

[SOLVED] Music


zhangy

Recommended Posts

Hello, I was wondering what is the best way to allow a user to upload mp3 files to a mysql database and then allow them to be played back from the database (or ive read something about having it in the url, though i dont quite understand it or know if that's applicable here)? Ive read that its not a good idea to play mp3 files from a database or even store them there because of performance issues due to the potential file sizes. If that is the case then what other alternative is there?

Link to comment
https://forums.phpfreaks.com/topic/178214-solved-music/
Share on other sites

Hi zhangy,

 

Anywhere you specify. 

 

The user would upload the MP3 file via a form, then you would use PHP to copy the file to you specified location.  As well as the copy process, you would also (as MrAdam says) update your database with the required file details - location, name, size, title, etc, etc.

 

It's essentially no different to uploading an image, or any file for that matter.

 

Hope this helps.

Link to comment
https://forums.phpfreaks.com/topic/178214-solved-music/#findComment-940459
Share on other sites

Hi, to be honest this is my first time trying out file uploading with php, so please forgive my ignorance. Is there a way to create a directory using control panel that can store the mp3s? I really cant grasp this. Is there a MO for this practise, some example that I can follow?

Link to comment
https://forums.phpfreaks.com/topic/178214-solved-music/#findComment-941146
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.