how to play songs which are in database
-
how to play list of songs selected which are in database can any one help to me **list.php**
"; $song_id[]=array(); $title[]=array(); $query1=mysql_query("select * FROM songs "); while($result=mysql_fetch_array($query1)){ $song_id[]=$result['song_id']; $title[]=$result['title']; } $len=sizeof($song_id); $len1=sizeof($title); for($i=1;$i<$len;$i++){ ?>
**play.php** Audio Player Demo //<![CDATA[ $(document).ready(function(){ new jPlayerPlaylist({ jPlayer: "#jquery_jplayer_1", cssSelectorAncestor: "#jp_container_1" }, [ <?php for($i=0;$i<$len-1;$i++){ $query1=mysql_query("select * FROM songs where song_id=$songid[$i]"); while($result=mysql_fetch_array($query1)){ ?> { title:<?php echo $result['title'];?>, mp3:<?php echo $result['url'];?> //oga:<?php echo $result['url'];?> } <?php } } ?> ], { playlistOptions: { //autoPlay: true, enableRemoveControls: true }, swfPath: "js", supplied: "oga, mp3", wmode: "window" }); }); //]]>
- [previous](javascript:;)
- [play](javascript:;)