.
.
.
while ( $row = mysql_fetch_array($res) )
{
echo "<tr>";
echo "<td><input type=\"radio\" name=\"mod\" /></td>";
echo "<td>" . $row['a'] . "</td>";
echo "<td>" . $row['b'] . "</td>";
echo "<td>" . $row['c'] . "</td>";
echo "<td>" . $row['d'] . "</td>";
echo "<td>" . $row['e'] . "</td>";
echo "</tr>";
}
echo "</table>
Printing database data to an HTML table with PHP "echo".
For example, when this displays, there will be X rows of 6 columns (5 data and one a radio button).
For the row selected with the radio button, I need all of that specific rows data to POST to another .php page.
My initial thought was create an onClick() function for the radio button, with the data as parameters to the functions, then, having the function do an AJAX POST with that data.
or should I create a form around the table? If so, how would I get that rows data as form data?
Is there a better way?
mysqlfunctions are deprecated. You should consider using newer functions, as defined here