I need a form that pulls options from a table(medium) but it will update another table(artist). I have at least 6 different tables to pull from but it only updates the info in one table(artist). I have the form working as a regular input form and it updates fine.
I think I may need to use an array to get the information but not clear on how to do that. I have researched arrays and cannot find any good examples on how to do this.
This is what I came up with but it doesn't work - FYI, its embed in another form but can't figure out how to pull the info from each table into the form
echo "<tr><td> \n";
echo "<b>Medium</b> <br><br>";
$result = mysql_query("SELECT * FROM medium order by medName") or die(mysql_error());
$num_rows=mysql_num_rows($result);
if ($num_rows != "0")
{
echo "<form method='post' action='updateArtist.php'>";
echo "<select name='medium'>";
while ($r=mysql_fetch_array($result))
{
$medName=$r["medName"];
$medid=$r["medid"];
$description=$r["description"];
$keywords=$r["keywords"];
$notes=$r["notes"];
echo "<option value='$medid_1' selected>$medName</option>";
}
echo "</select>";
echo "<input type='hidden'>";
echo "</form>";
}
echo "</td></tr>\n";
I am really new to PHP & MySQl and have very little experience with arrays.