Hello all.
I have been googling for quite a bit but I have not found any helpful solutions to my idea.
I am going to upload mp3's to a database via upload script.
Then along with the mp3 I would enter the song name and band.
Is it possible to have the xml get the info from the database somehow?
I would like to make a very user friendly mp3 player.
This way the user could run the php script to enter the table. No mysql knowledge needed.
Then have a form where you upload the mp3 and also enter the song/band name.
If this is possible could someone please show me the code for executing this?
How would this code look to get an mp3 from a database?
Code:
<?xml version='1.0' encoding='utf-8'?>
<songs>
<song name="Pixel2Life Soundtrack 01" file="music/p2l_01.mp3" />
<song name="Twodded Soundtrack 01" file="music/twod_01.mp3" />
</songs>
If this was my database..
Code:
<?php
include "includes/db.php";
$query = 'DROP TABLE `tunz`';
$result = mysql_query($query);
$query = 'CREATE TABLE `tunz` (
id int(11) NOT NULL auto_increment,
songname varchar(32) NOT NULL UNIQUE,
band varchar(32) NOT NULL,
mp3 varchar(32) NOT NULL,
PRIMARY KEY (`id`))
ENGINE=INNODB;';
$result = mysql_query($query);
echo "Table Created!";
?>
Thank you..Hooch