Jump to content

Recommended Posts

what i am trying to do is embed a music player in my php page. The mp3s are uploaded by users and the mp3 links are in my sql database and files are stored in my "files" folder. I have no idea on where to start, should i use flash or java or another??? i really dont know what would be best. any ideas or easy to follow tutorials would be a great help or if anyone has done anything like this.

 

thanks in advance,

J

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

EDIT: Ohh i get it now :P Yeah sounds like a job for flash ;)

 

What i did was, make a file called view-track.php or anything else

 

<?
$id = $_GET['id'];
$dbcnx = mysql_connect("localhost", "root", "password"); mysql_select_db("database");
          $result = @mysql_query("SELECT * FROM tracks WHERE id=$id");
     if (!$result)   {     echo("<b>Error performing query: " . mysql_error() . "</b>");
       exit();          }    while ($row = mysql_fetch_array($result) )  {
	$id = $row["id"];
	$artist = $row["artist"];
	$song = $row["song"];
echo("<center><font size=1 face=verdana>Listening To $song by $artist");  
?>
<br><br><embed src="<?echo"$artist - $song";?>.mp3" 
width="250" height="40" autostart="true" loop="false"> 
</embed>
<?}?>

Link to comment
https://forums.phpfreaks.com/topic/105597-music-player/#findComment-540959
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.