If I have a number submit buttons one after another, How do I know which button is pressed dynamicly (no hardcoded)? Based on which button pressed the value of that particular item is passed to the php script.
I am thinking something like:
print "<form method=\"post\" action=\"$PHP_SELF\">";
for (i=1;$i<=$rows;$i++) {
print "<value type=text name=$somevar value=$somevar>";
print "<input type=\"submit\" name=\"select\" value=\"Select\">;
}
My problem is $somevars is always the last item in that for loop, what I want is the value of that particular selected item.
Thanks.