there's some info on this here: http://www.phpbuilder.com/columns/laflamme20001016.php3
also, if you something like this "DELETE FROM route_feat WHERE r_id='$id'"; without a LIMIT statement, it will delete all pertinent database entries.
something i've been using follows. good luck jane.
// clear old features info:
$sql = "DELETE FROM `route_feat` WHERE r_id='$id'";
$toss_features = mysql_query("$sql")
or die ("\n\n<P><B>Error in our query: </B>\n<PRE>$sql</PRE>\n<P>". mysql_error() ."</P>");
// save new features info:
$feat_count = count($feat_name);
$sql = "INSERT INTO `route_feat`\n (r_id,name,utm,elevation,time,distance) \nVALUES\n ";
for ($i=0; $i < $feat_count; $i++) {
$sql .= "('$id', '$feat_name[$i]', '$utm[$i]', '$elevation[$i]', '$time[$i]', '$distance[$i]')";
}
$sql = str_replace(")(", "),\n (", "$sql");
$result = mysql_query("$sql")
or die ("\n\n<P><B>Error in our query: </B>\n<PRE>$sql</PRE>\n<P>" . mysql_error() ."</P>");