I have no functions in that include. It is basically HTML to display a form. It needs to be filled with their data ($getinfo=fetched in listadd.php) so that they can edit and update.
include (listedit.php)
<?php
$fields = mysql_list_fields($db, "contacts", $link);
$rows = mysql_num_fields($fields);
print "<form action='listupdate.php' method='POST'>\n";
print "<table width=80% border=1>\n";
//Spew out each field name and data in a row
for ($i = 0; $i < $rows; $i++)
{
$sid = $getinfo[id];
print "<tr>\n";
$fname = mysql_field_name($fields, $i);
$field = $getinfo[$i];
if (is_null($field))
$field = "x";
print "\t<td><font face=arial size=2/>".$fname."</font></td>\n";
print "\t<td><font face=arial size=2/><input type='text' size=20 value=\"".$field."\" name=$fname></td>\n";
// print "\t<td><font face=arial size=2/>$field</font></td>\n";
print "</tr>\n";
}
print "</table>\n";
print "<BR>";
print "\t <input type='submit' value='Update' name='submit'>";print "</form>\n";
mysql_close($link);
?>
UPDATE: The problem was that I was enumerating through the array but had only pulled it as ASSOC (instead of the default both). I changed my
$getinfo = mysql_fetch_array($result, ASSOC);
TO
$getinfo = mysql_fetch_array($result);