You'll need to pass that value through the form as well (presuming this is a POST form). Now when you POST variables, only the name and value of each field will be passed, so in your case:
// pseudo/example
exon_start[] => each_value (start)
So you need exon_pk and start, you'll have to concatenate them together to pass through as the value. I'm going to use | as a delimiter, you can use whatever you like but make sure it will never be in either of those variables:
while ($row_exon = mysql_fetch_assoc($result_exon)){
echo "<input name='exon_start[]' type='text' id='". $row_exon['exon_pk'] . "' value='" . $row_exon['exon_pk'] . '|' . $row_exon['start'] . "' />";
}
Now when you post through, your data will be:
// pseudo/example
exon_start[] => each_value (exon_pk|start)
So you can split it to get each variable:
foreach($_POST['exon_start'] as $each_var){
list($exon_pk, $start) = explode('|', $each_var);
$query_exon = "UPDATE exon SET start = '$start' WHERE exon_pk = '$exon_pk'";
$result_exon = mysql_query($query_exon, $connection) or die(mysql_error());
}
Side note: for the record, mysql_* extension has been deprecated for years and will probably be removed completely in the future. You should start using mysqli_* or PDO extensions instead.
Also, this is not an ideal thing to do (in my opinion) because you are losing the roughly structured data you had by joining things together with delimiters, and as I said, if you have your delimiter in either of those variables at any point - by by working script.
Docs: