This Should Help:
<?php
// connect to database
if ($submit) {
// Check to see if id exist
if ($id) {
$sql = "UPDATE conti SET
colname='$colname' WHERE id=$id";
}
// run SQL against the DB
$result = mysql_query($sql);
// Check for errors
print mysql_error();
echo "<center>Update successful!";
}
} else {
$statement="select * from table where id=$id";
$myresult = mysql_query($statement);
$result = mysql_fetch_array($myresult);
$id = $result["id"];
$lnum = $result["lnum"];
$colname = $result["colname"];
?>
<!-- Set Update Actions -->
<input type="hidden" name="id" value="<?php echo $id ?>">
<CENTER>
<FONT SIZE=3 FACE="Arial">
Form
</FONT>
</CENTER>
<p align="right"><font color="#000000">
Name: </font><input type="text" name="colname" value="<?php echo $colname ?>" size="20"><br>
<input type="submit" value="submit" name="submit"><?php } ?>
Hope this helps you might want to shape it up a little
Richie