go****@charliefortune.com (charlie fortune) writes:
I want to use a form with several different possibilities of posting
to a single PHP program. Is there a way of telling the action not just
the name of the file, but which function to call with the information
<form action="script.php" method="post">
.....
<input type='submit' name='action1' value="Do Action 1">
<input type='submit' name='action2' value="Do Action 2">
<input type='submit' name='action3' value="Do Action 3">
.....
</form>
or
<form action="script.php" method="post">
.....
<input type='submit' name='action' value="Do Action 1">
<input type='submit' name='action' value="Do Action 2">
<input type='submit' name='action' value="Do Action 3">
.....
</form>
Use either the name or the value (or both) of the submit variable to
work out what to do in the script.
--
Chris