Hello,
Is there a way to send multiple vars via the querystring using form action without javascript? I have a form containing a table of users which I would like to add "Create" and "Update" buttons for each user to create and update invoice data. I would like to be able to click on the respective buttons to send the "create" or "update" value along with the username.
function display_invoice_table($result)
{
// display the table of users
// set global variable, so we can test later if this is on the page
global $invoice_table;
$invoice_table = true;
// $action = create or update
// $user = username
?>
<br />
<?php
echo "<form name='invoice_table' action='create_invoice.php?a=$action?u=$user' method='post'>";
echo '<table cellpadding="0" cellspacing="0" align="center" border="1">';
echo "<tr><td><strong>User</strong></td>";
echo "<td><strong>Invoice?</strong></td>";
echo "<td><strong>First Name</strong></td>";
echo "<td><strong>Last Name</strong></td>";
echo "<td><strong>Agent Name</strong></td>";
echo "<td><strong>Email</strong></td></tr>";
while ($obj = mysqli_fetch_array($result)) {
printf ("<tr><td>%s</td><td><input type='submit' name='create' value='Create'></td><td><input type='submit' name='update' value='Update'></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
$obj['username'], $obj['username'], $obj['first_name'], $obj['last_name'], $obj['agent_name'], $obj['email']);
}
mysqli_free_result($result);
}
?>
Thanks for any help,
J