Hi all…
I’m trying to create a simple HTML table generated by php from mySQL table. This table simply displays the First Name and Last Name of all Employees in the database table.
The trick is, I would also like to generate an HTML FORM, so beside each first and last name, there is a button that submits the first and last name to another php processing page.
Can this be done?
eg.
//Connect to database
mysql_select_db(“cls_1”, $con);
//Query database and set result to variable
$result = mysql_query(“SELECT * FROM cls_app_form”);
//Close Connection
mysql_close($con);
//Generate Table
while($row = mysql_fetch_array($result))
{
echo “<td>”$row[‘FirstName’] . ” ” . $row[‘LastName’] *PUT FORM BUTTON HERE!”</td>”;
echo “<br />”;
}