Can someone help me, I want to edit data in my database using a form, I have the upload form i want the edit one now, I have adapted my upload form with echo in the form, but nothing is showing up can someone look for me!!!??
<HEAD><TITLE>Store binary data into SQL Database</TITLE></HEAD>
<BODY bgcolor="#FFFFCC">
<?php
// code that will be executed if the form has been submitted:
if ($submit) {
// connect to the database
// (you may have to adjust the hostname,username or password)
include("connect.php");
mysql_select_db("vmplay");
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("UPDATE vmplay (description,bin_data,filename,filesize,filetype,author,cat,headline,date,fulldate,special,shortnews,fullnews,videourllow,videourlmed,videourlhigh,artistinfo) ".
"VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type','$author','$cat','$headline','$date','$fulldate','$special','$shortnews','$fullnews','$videourllow','$videourlmed','$videourlhigh','$artistinfo')");
$id= mysql_insert_id();
print "<p>This file has the following Database ID: <b>$id</b>";
MYSQL_CLOSE();
} else {
// else show the form to submit new data:
?>
<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
<div align="center">
<table width="90%" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<th width="316">Type your Name here:</th>
<th width="565">
<input type="text" name="author" size="40" value="<?php echo $author; ?>">
</th>
</tr>
<tr>
<th>Choose Category</th>
<th>
<select name="cat" size="1">
<option>latest News</option>
<option selected>ex</option>
<option>music</option>
<option>movies</option>
<option>interact</option>
<option>win</option>
<option>staff news</option>
<option>music video</option>
</select>
</th>
</tr>
<tr>
<th><br>
Type Headline</th>
<th>
<input type="text" name="headline" size="40" value="<?php echo $headline; ?>">
</th>
</tr>
<tr>
<th><br>
Special (if any)</th>
<th>
<input type="text" name="special" size="40" value="<?php echo $special; ?>">
</th>
</tr>
<tr>
<th height="28">Frontpage Date (don't change)</th>
<th height="28">
<input type="text" name="date" value="<?php echo $date; ?>" size="40">
</th>
</tr>
<tr>
<th>Hidden Date (don't change)</th>
<th>
<input type="text" name="fulldate" value="<?php echo $fulldate; ?>" size="40">
</th>
</tr>
<tr>
<th>Your News in short</th>
<th>
<textarea name="shortnews" rows=10 cols=40 WRAP value="<?php echo $shortnews; ?>" input type="text">
</textarea>
</th>
</tr>
<tr>
<th>Your News in full</th>
<th>
<textarea name="fullnews" rows=10 cols=40 WRAP input type="text" value="<?php echo $fullnews; ?>">
</textarea>
</th>
</tr>
<tr>
<th><br>
File Description:</th>
<th>
<?php echo $form_description; ?><BR><BR>
<input type="text" name="form_description" size="40">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
</th>
</tr>
<tr>
<th>File to upload/store in database:</th>
<th><img src=getdata.php?id=<?php echo $id; ?> border=0 width=186 height=161 align=center><br>
<input type="file" name="form_data" size="40">
</th>
</tr>
<tr>
<th height="15" bgcolor="#33CCFF">Windows Media URL - LOW</th>
<th height="15" bgcolor="#33CCFF">
<input type="text" name="videourllow" size="40" value="<?php echo $videourllow; ?>">
</th>
</tr>
<tr>
<th bgcolor="#33CCFF">Windows Media URL - MED</th>
<th bgcolor="#33CCFF">
<input type="text" name="videourlmed" size="40" value="<?php echo $videourlmed; ?>">
</th>
</tr>
<tr>
<th bgcolor="#33CCFF">Windows Media URL - HIGH</th>
<th bgcolor="#33CCFF">
<input type="text" name="videourlhigh" size="40" value="<?php echo $videourlhigh; ?>">
</th>
</tr>
<tr>
<th bgcolor="#33CCFF">Real Media URL - LOW</th>
<th bgcolor="#33CCFF"> NOT YET AVALIABLE</th>
</tr>
<tr>
<th bgcolor="#33CCFF">Real Media URL - MED</th>
<th bgcolor="#33CCFF">NOT YET AVALIABLE </th>
</tr>
<tr>
<th bgcolor="#33CCFF">Real Media URL - HIGH</th>
<th bgcolor="#33CCFF">NOT YET AVALIABLE </th>
</tr>
<tr>
<th bgcolor="#33CCFF">Real Media URL - SURESTREAM</th>
<th bgcolor="#33CCFF">NOT YET AVALIABLE </th>
</tr>
<tr>
<th height="30" valign="top">Artist Info:</th>
<th valign="top">
<div align="center">
<input type="text" name="artistinfo" size="40" value="<?php echo $artistinfo; ?>">
</div>
</th>
</tr>
<tr>
<th height="21" colspan="2" valign="top">
<p> </p>
<p>
<input type="submit" name="submit" value="submit">
</p>
</th>
</tr>
</table>
</div>
</form>
</BODY>