I'm trying to retrieve data from my MySQL database and inputing it into a form so that i can edit it and modify the data.
This is where i'm having trouble. Any info would be appreciated.
// Printing results in HTML
echo "<table border=1>\n";
echo "<tr><th bgcolor = \"#CCCCFF\">Type</td>
<th bgcolor = \"#CCCCFF\">Description</td>
<th bgcolor = \"#CCCCFF\">Price</td>
<tr>";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td><input type="text" name="T1" size="20" value=$col_value></td>\n";
}
print "\t</tr>\n";
}
print "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>