PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I dont know whether this is the right place to post this but:
I have a website where in a database all information about certain mp3 files, I let the user search the database and then they can download a song.
I have made it possible to search the database but don't know how to download a file which is from a certain path which is stored in the database.
Could someone give me some example code or explain how to do this.
I just don't understand something: The MP3 isn't stored in the DB right? The path to the file is stored in the db and the MP3 sits somewhere on the server, right?
Ok, then you would typically echo an html <a href="path/path/path/filename.mp3"></a> where the "path/path/path/filename.mp3" should be referencing the file on your PC. The path should be accessable through your browser. Much like when you try to view an image in a new window.