<b>Add to</b>
<?php 
include('config.php');
$my=str_replace("%20"," ",$_SERVER["REQUEST_URI"]);
$strcut=strstr($my, '=');
$ok=str_replace("=","",$strcut);
mysql_connect($dbloc, $dbuser, $dbpass);
mysql_select_db($db); 
//Add the Video
if(@$_POST['dname']){
$playlist=$_COOKIE['username']. @$_POST['dname'];
$pubpliser=$_COOKIE['publisher'];
mysql_query("INSERT INTO $playlist(userid, allgenreid) VALUES('admin', '$ok')"); 
echo 'Video Added to Playlist';
}
 $plistbb=$_COOKIE['username']. 'playlist';
$resultmn = mysql_query("SELECT * FROM $plistbb");
   $depts = array();
    while($rowmn=mysql_fetch_array($resultmn))
    {
///////////Get all the videos from the playlist
echo '<P><table width=96% bgcolor=white align=center><tr>
<td width=42%><form action="playlistadd.php?='. $ok. '" METHOD="post">
<input type=hidden name=dname value="'. $rowmn['id']. ' ">
<input type=hidden name=publisher value="'. $rowmn['userid']. ' ">
<input type=submit value="'. $rowmn['title']. '">
</form>
</td></table>';
     }
?>