I've got a submission form that transmits data to some database. I Quickly output that data in the database in HTML. Now, I must submit yet another bit of data via a form to the database. I can not learn how to result in the new data match the present records.

This really is my output code (data from database to HTML with new form for further data):

<html>
<body>
<?php

mysql_connect(localhost,root,root);
@mysql_select_db(test) or die( "Unable to select database");
$query="SELECT * FROM submission";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();
?>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<th><font face="Arial, Helvetica, sans-serif">Read By</font></th>
<th><font face="Arial, Helvetica, sans-serif">Date/Time</font></th>
<th><font face="Arial, Helvetica, sans-serif">URL</font></th>
<th><font face="Arial, Helvetica, sans-serif">Uploaded File</font></th>
<th><font face="Arial, Helvetica, sans-serif">Email / Twitter</font></th>
<th><font face="Arial, Helvetica, sans-serif"></font></th>
</tr>

<?php
$i=0;
while ($i < $num) {

$Date=mysql_result($result,$i,"Date");
$url=mysql_result($result,$i,"url");
$uploadedfile=mysql_result($result,$i,"uploadedfile");
$contact=mysql_result($result,$i,"contact");
?>

<tr><form name="reader" action="reader.php" method="POST">
<td><font face="Arial, Helvetica, sans-serif"><input type="checkbox" name="reader" value="Max"> Max <input type="checkbox" name="reader" value="Aaron"> Aaron</font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $Date; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $url; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $uploadedfile; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $contact; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><input type="submit" value="Submit"></font></td>
</form>
</tr>

<?php
$i++;
}
?>
</body>
</html>

Which is the readers.php code:

    <?php

$error=0;

$con = mysql_connect('localhost', 'root', 'root'); //Replace with your actual MySQL DB Username and Password
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("longform", $con); //Replace with your MySQL DB Name
$reader=mysql_real_escape_string($_POST['reader']); //This value has to be the same as in the HTML form file
$sql="INSERT INTO submission (reader) VALUES ('$reader')"; /*collect is the name of the MySQL table where the form data will be saved.name, email and comments are the respective table fields*/

if (!mysql_query($sql,$con)) {
 die('Error: ' . mysql_error());
}

$message="Done!";
mysql_close($con); 


?>

At this time, readers.php adds a brand new database entry using the items in the shape, I want it to include that data towards the existing corresponding entry.

EDIT: So, I simply recognized I have to be utilising UPDATE rather than Place, however i have no clue how...

EDIT: I believe I have made some progress within the right direction, because of commenters. New code still is not working though:

Output + Form:

<html>
<body>
<?php

$id=$_GET['id'];

mysql_connect(localhost,root,root);
@mysql_select_db(longform) or die( "Unable to select database");
$query="SELECT * FROM submission";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();
?>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<th><font face="Arial, Helvetica, sans-serif">Read By</font></th>
<th><font face="Arial, Helvetica, sans-serif">Date/Time</font></th>
<th><font face="Arial, Helvetica, sans-serif">URL</font></th>
<th><font face="Arial, Helvetica, sans-serif">Uploaded File</font></th>
<th><font face="Arial, Helvetica, sans-serif">Email / Twitter</font></th>
<th><font face="Arial, Helvetica, sans-serif"></font></th>
</tr>

<?php
$i=0;
while ($i < $num) {

$Date=mysql_result($result,$i,"Date");
$url=mysql_result($result,$i,"url");
$uploadedfile=mysql_result($result,$i,"uploadedfile");
$contact=mysql_result($result,$i,"contact");
?>

<tr><form name="reader" action="reader.php" method="POST">
<td style="display:none;"><input type="hidden" name="unique_id" value="<? echo $id; ?>"></td>
<td><font face="Arial, Helvetica, sans-serif"><input type="checkbox" name="reader" value="Max"> Max <input type="checkbox" name="reader" value="Aaron"> Aaron</font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $Date; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $url; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $uploadedfile; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $contact; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><input type="submit" value="Submit"></font></td>
</form>
</tr>

<?php
$i++;
}
?>
</body>
</html>

readers.php:

<?php

$error=0;

$con = mysql_connect('localhost', 'root', 'root'); //Replace with your actual MySQL DB Username and Password
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("longform", $con); //Replace with your MySQL DB Name

$reader=mysql_real_escape_string($_POST['reader']); //This value has to be the same as in the HTML form file

$query="UPDATE submission SET reader='$reader' WHERE id='$unique_id'";
mysql_query($query);
echo "Record Updated";
mysql_close();

?>

Any assist with this could totally rock my world.

EDIT: It Really Works! I simply desired to publish the running code here just in case another person needs it:

output.php

<html>
<body>
<?php

mysql_connect(localhost,root,root);
@mysql_select_db(test) or die( "Unable to select database");
$query="SELECT * FROM table WHERE field = '';
";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();
?>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<th></th>
<th><font face="Arial, Helvetica, sans-serif">Read By</font></th>
<th><font face="Arial, Helvetica, sans-serif">Date/Time</font></th>
<th><font face="Arial, Helvetica, sans-serif">URL</font></th>
<th><font face="Arial, Helvetica, sans-serif">Uploaded File</font></th>
<th><font face="Arial, Helvetica, sans-serif">Email / Twitter</font></th>
<th><font face="Arial, Helvetica, sans-serif"></font></th>
</tr>

<?php
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"id");
$date=mysql_result($result,$i,"date");
$url=mysql_result($result,$i,"url");
$uploadedfile=mysql_result($result,$i,"uploadedfile");
$contact=mysql_result($result,$i,"contact");
?>

<tr><form action="reader.php" method="POST">
<td><input type="hidden" name="id" value="<? echo $id; ?>"></td>
<td><font face="Arial, Helvetica, sans-serif"><input type="checkbox" name="reader" value="Max"> Max <input type="checkbox" name="reader" value="Aaron"> Aaron</font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $date; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $url; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $uploadedfile; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $contact; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><input type="submit" value="Submit"></font></td>
</form>
</tr>

<?php
$i++;
}
?>
</body>
</html>

readers.php

<?php

$error=0;

$con = mysql_connect('localhost', 'root', 'root'); //Replace with your actual MySQL DB Username and Password
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("longform", $con); //Replace with your MySQL DB Name

$reader=mysql_real_escape_string($_POST['reader']); //This value has to be the same as in the HTML form file
$id=mysql_real_escape_string($_POST['id']);
$query="UPDATE submission SET reader='$reader' WHERE id='$id'";
mysql_query($query);
echo "Record Updated";
mysql_close();
?>