Thought this would be a easy fix, but alas, no other forum has been able to help me... I will show you the code first and then explain the issue...
//GET DRILLS BASED OF PYRAMID SUBCATAGORIES
$query2 = "SELECT distinct Drill.Drill_id, Drill.Drill_title,Sub_cat.Sub_desc
FROM Drill, Catagory, Sub_cat, Drill_sub
WHERE Drill.Drill_id = Drill_sub.Drill_id AND Drill_sub.Subcat_id = Sub_cat.Subcat_id AND Sub_cat.Subcat_id = '$SUBCAT_ID'";
$result2 = @ ($query2); // Run the query.
echo" <form action=\"drill.php\" method=\"post\" >
<td valign=\"top\"><table width=\"100%\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" bordercolor=\"#006699\">
<tr>
<td height=\"10\" bordercolor=\"#336699\" bgcolor=\"#42A0FF\"><font color=\"#FFFFFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>SubCatagory
Drills</strong></font></td>
</tr>";
IF ($row=mysql_fetch_array($result2) == 0){
echo"
<tr>
<td align=\"center\" height=\"10\" bordercolor=\"#336699\" bgcolor=\"#FFFFFF\"><p> no sub drills </p></td> </tr>";
}else{
while ($row=mysql_fetch_array($result2)) { $drID=$row["Drill_id"];
$title=$row["Drill_title"];
echo"
<tr>
<td align=\"center\" height=\"10\" bordercolor=\"#336699\" bgcolor=\"#FFFFFF\">
<!-- PROBLEM AREA CODE -->
<input type=\"submit\" name=\"drTITLE\" value=\"$title\" title=\"$title\" >
<input type=\"hidden\" name=\"drID[]\" value=\"$drID\" />
<!-- END OF PROBLEM AREA CODE -->
</td> </tr>";
}
}
echo"
</table>
</td>
</tr>
</table>
</td>
</form> ";
SO - As you can see, I have a SUBMIT and a HIDDEN posting. The way that it is currently working is that NAME="drID[]" POSTs the entire array of drill_id's. At present there is no way of me knowing which button was pressed, because simply EVERY button value is passed, that was looped out previously. IF I get rid of the HIDDEN input and put the VALUE of the SUBMIT as $drID, it passes 1 value just fine for me to beautifully use it on the next page... but then the LABEL of the button is a number rather than a descriptive user friendly drill TITLE which they need.... whoever invented the SUBMIT button with the VALUE showing rather than TITLE, needs a kick!!
HELP PLEASE!!