<title>My Videos - Edit Video</title>
<?php include("headertop.php"); 
include('config.php');
mysql_connect($dbloc, $dbuser, $dbpass);
mysql_select_db($db);
$ok=$_POST['edit'];
///////////Update/////////////
if(@$_POST['delete']){
$duser=$_POST['delete'];
$vname=$_POST['vname'];
$description=$_POST['description'];
$nextid=$_POST['nextid'];
mysql_query("UPDATE allgenres SET vname='$vname', description='$description' WHERE id='$duser'");
}
///////Update End////////
////Get Video Details/////////////
$result = mysql_query("SELECT * FROM allgenres where id ='$ok'"); 
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
echo '<P><table bgcolor=white width=95% width=90% align=center>
<td width=100%><br>
<b>'. $row['vname']. '
</td></table>
<table bgcolor=white width=95% width=90% align=center>
<td><br><a href=stream.php?='. $row['id']. '><img src="thumbs/'. $row['image']. '" width=200 height=200 alt="'. $sname. '" title="'. $sname. '">
</td><td valign=top><b>Video Information</b><br>
<font size=3> Views:'. $row['downloads'].  ' <bR>Publishing Date: '. $row['date']. ' <bR>Duration: '. $row['duration'].
' <bR>Video URL: '. $site. 'stream.php?='. $row['id'].
'</tD>
</td></table>
<table bgcolor=white width=95% width=90% align=center>
<td width=25% height=200 valign=top bgcolor=white><font size=2><br><b>'. $sname. '<b></a>
<form action="myvideosedit.php" METHOD="post">
<input type=hidden name=delete value='. $row['id']. '>
<input type=hidden name=nextid value='. $row['nextid']. '>
<b>Video Title</b><bR>
<input type=text name=vname value="'. $row['vname']. '"><bR>
<P><b>Description</b><bR>
<input type=text name=description value="'. $row['description']. '"><bR>
<input type=submit value="Save Changes"></form>
</td>'; 
}
?></table>
<?php include("headerbottom.php"); ?>
