This is my first post, so I hope I’m doing it correctly.
This code displays several rows, and for each one there is a button that I would like
to redirect to the next form to edit the current line ID register.
I’m using variable hidden input names that are row-specific:
<?php
while($row = mysql_fetch_array($result))
{
$ID_variable[$count] = "ID".$row['ID'];
echo "<tr>";
echo "<td><input type=\"submit\" name=\"edit\" value=".$row['ID']."></td>";
echo "<td>" . $row['lastname'] . "</td>";
echo "<td><input type=\"hidden\" name=".$ID_variable[$count]." value=".$row['ID']."></td>";
echo "</tr>";
$count++;
}
?>
So, I would like to pass the hidden name value for a given row to the next form I’m working with.
There must be a really simple solution, but I’m really stucked. Thanks for your time.
You should use javascript/jQuery to do this. This can also be done in php way but then you need to use forms.