To Genius out there,
I know there were few thread on this topic in this forum, but mine is slightly twisted ?.
I have this script where it gets records from database and displays in a table format with each row has its own submit button.
sample code:
[code=php]
$num=mysql_num_rows($sqlresult);
for ($j=1,$j<=$num;$j++){
bla bla bla….
print “<tr><td><input type=”submit” name=”submit$j” value=”update”></td></tr>”;
}
this code will only show records of 6 rows max (average of 4 rows). At anyone time there will be 4 – 6 submit buttons.
My question is how to identify which submit button is clicked? because the code behind each submit button is to update the record of that particular row instead of updating all the 4-6 rows displayed where all of the records has its own ID field in the table
I would appreciate if anyone could point me in the right direction to solve this or if there is any other method of doing this.
Thanks in advance