The code below outputs to forms. The two forms both have two hidden fields whitch I'm using to pass the variables $artist and $cd_title to another script.
The problem is the secound form is not passing $cd_title to the script while the first form does pass $cd_title. I dont get it!
<? while ($row = mysql_fetch_array($result))
{
//If CD's are availble print a list of CDs
if ($row['cd_title'] == NULL) { echo "No CD's Available";
}
else {
echo "<tr bgcolor='#F4F4F4' bordercolor='#CCCCCC'><td >".$row['cd_title']."</td>";
echo "<td>".$row['cd_status']."</td>";
echo "<td>".$row['cd_promotion']."</td>";
echo "<td>".$row['cd_price']."</td>";
echo "<td><div align='right'>";
echo "<form action='edit_cd.php' method='POST'>";
echo "<input type='hidden' name='cd_title' value='".$row['cd_title']."'>";
echo "<input type='hidden' name='artist' value='".$row['artist']."'>";
echo "<input name='POST' type='submit' value='Edit'>";
echo "</form></div></td><td valign='top'></div>";
echo "<form action='edit_tracks.php' method='POST'>";
echo "<input type='hidden' name='cd_title' value='".$row['$cd_title']."'>";
echo "<input type='hidden' name='artist' value='".$row['artist']."'>";
echo "<input name='POST' type='submit' value='Edit Tracks'></form>";
}
}
mysql_free_result($result);
mysql_close($conn);
?>