# playlist using php mysql

**URL:** <https://community.wowza.com/t/playlist-using-php-mysql/38632>\
**Category:** Wowza Streaming Engine\
**Tags:** media-players-and-devices\
**Created:** [May 19, 2012, 9:35am UTC](https://community.wowza.com/t/playlist-using-php-mysql/38632 "2012-05-19T09:35:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Johnson](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Tom\_Johnson](https://community.wowza.com/u/Tom_Johnson)\
**Post date:** [May 19, 2012, 9:35am UTC](https://community.wowza.com/t/playlist-using-php-mysql/38632/1 "2012-05-19T09:35:58Z")

</div>

So I am trying to generate a playlist based on entries in a mysql database. I’m not sure how to structure the code for the playlist. The examples flowplayer gives doesn’t look like it is geared for wowza. Here is my code:

```auto
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <!-- flowplayer javascript component -->
    <script type="text/javascript" src="flowplayer-3.2.9.min.js"></script>
    </head>
<body>
    <script type="text/javascript">
	$f("container3", "flowplayer-3.2.10.swf", 
		{
			clip: {
				provider: 'rtmp'
			},
			playlist [
<?php
while($row = mysql_fetch_array($result))
  {
 $title = $row['title'];
	echo " 'mp4:" . $title . "',\n";
}
mysql_close($con);
?> 
			],
			plugins: {
				rtmp: {
				url: 'flowplayer.rtmp-3.2.9.swf',
				netConnectionUrl: 'rtmp://[my-ip]:1935/vod'
				}
            		controls: {
                	playlist: true
			loop: true
            			}
			}
		}
	);
</script>
       
</body>
</html>

```

Anyone know what I am missing? I get no errors, but the clips never play.

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 20, 2012, 11:03pm UTC](https://community.wowza.com/t/playlist-using-php-mysql/38632/2 "2012-05-20T23:03:02Z")

</div>

You might be able to use the player’s visibile playlist feature and make it not visible and make it play and loop, which is essentially what I think you are trying to achive.

Otherwise, you will have to get into the Actionscript, I don’t think you can do this through the html container. You are trying to do this:

```auto
netstream.play("video1",0,-1, true);
netstream.play("video2",0,-1, false);
netstream.play("video3",0,-1, false);

```

Note that the first item has to have the reset flag (4th arg) set to true, and false in every following item to form a playlist.

Richard
