Hello
I have one form that is dynamically created from a mysql database.
At the bottom I want to have buttons that do different things (add/edit/delete/etc.). When the buttons are clicked to open different pages or just reload the same one. I need to post the selected radiobutton to whatever page needs it.
Example of the submit buttons.
The javascript functions just calls:
How can I sumbit the values selectform when submitting an other form?
Thanks in advance.
I have one form that is dynamically created from a mysql database.
Code:
echo ("<form name=selectform method=\"POST\">");
while ($myrow = mysql_fetch_array($result))
{
echo ("<TR>");
echo ("<TD>");
echo ("<label><input type=\"radio\" name=\"details\" value=\"{$myrow["ID"]}\">");
echo ("<TD>");
printf ($myrow["Date"]);
echo ("<TD>");
printf ($myrow["Client"]);
echo ("<TD>");
printf ($myrow["TelW"]);
echo ("<TD>");
printf ($myrow["TelH"]);
echo ("<TD>");
printf ("R ");
printf ($myrow["Amount"]);
echo ("<TD>");
printf ($myrow["Consultant"]);
echo ("<TD>");
printf ($myrow["Bank"]);
echo ("<TD>");
printf ($myrow["Status"]);
echo ("<TD>");
printf ($myrow["Description"]);
}
echo("</form>");
At the bottom I want to have buttons that do different things (add/edit/delete/etc.). When the buttons are clicked to open different pages or just reload the same one. I need to post the selected radiobutton to whatever page needs it.
Example of the submit buttons.
Code:
<form name=addnewform method="POST" action="newentry.php">
<input type=submit name="addnewentry" value="Add New Entry" onclick=submit()>
</form>
<form name=delform method="POST" action="details.php">
<input type=submit name="delentry" value="Delete Entry" onclick=delSubmit()>
</form>
The javascript functions just calls:
Code:
function submit()
{
document.addnewform.submit();
}
function delSubmit()
{
document.delform.submit();
}
How can I sumbit the values selectform when submitting an other form?
Thanks in advance.