Hi all
I have a problem with posting this array. When I pot it, it only shows the last record not the one I have changed. I'm hoping someone can help??
<?php
dbopen();
if(isset($_GET['update'])){
echo "$make - $id";
$upsql = "UPDATE vehicle_make_tbl SET veh_make = '$make' WHERE id='$id'";
$result = mysql_query($upsql) or die ("unable to process");
print ("<center><br>File modified");
echo "<meta http-equiv=\"refresh\" content=\"3; url=vehicle_make-new.php\" />\n";
exit;
}
$query = mysql_query("SELECT * FROM vehicle_make_tbl ORDER BY veh_make");
$list = "<form action=\"$PHP_SELF?update=\" method=\"post\">";
while ($row = mysql_fetch_array($query)) {
$list .= "<input name=\"make\" type=\"text\" class=\"input_field\" value=\"".$row['veh_make']."\" size=\"40\">\n
<input name=\"id\" type=image value=\"".$row['id']."\" src=\"images/bt-modify.gif\" alt=\"".$row['id']."\" width=\"52\" height=\"16\" border=\"0\">
";
}
$list .= "</form>\n";
print $list;
?>
Thanks in advance