chitara Posted November 26, 2006 Share Posted November 26, 2006 Hello everybody!In my jukebox there is a facility to select multiple audio tracks with checkbox. Then the selected tracks will play with my defined player one after another. But here when I select more then one track al the tracks play all together I am sending the code in below. Can anybody please help me regarding this???? <?phpinclude "../admin/include/db.php"; $file=$_GET['track'];//var_dump($file);if($file != null) { for($i=0 ; $i < sizeof($file) ; $i++) { $music = $file[$i]; $result=mysql_query("select * from musiclibrary where music_no='$music'"); while($row=mysql_fetch_array($result)){ $play_no=$row['music_no']; //$play=$row['file_name']; } $sql_result=mysql_query("select file_name from musiclibrary where music_no='$play_no'"); while($rows=mysql_fetch_array($sql_result)){ $play=$rows['file_name']; ?><html><head><title>Player</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><div id="Layer1" style="position:absolute; width:300; height:300; z-index:2; left: -2px; top: -2px; background-color: #000000; layer-background-color: #000000; border: 1px none #000000"> <OBJECT ID="MediaPlayer" WIDTH=300 HEIGHT=300 classid="clsid:22D6f312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Media Player components" TYPE="application/x-oleobject" codebase="http://activex.microsoft.com"> <PARAM NAME = "autostart" VALUE = "True" > <PARAM NAME = "filename" VALUE = "<?print $mdir."/".$play;?>" ></OBJECT> </div></body></html><? } }//var_dump($music); } ?>Regards Link to comment https://forums.phpfreaks.com/topic/28497-looping-problem-to-play-music/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.