By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,534 Members | 1,807 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,534 IT Pros & Developers. It's quick & easy.

is it possible to submit to a specific function inside another file

P: n/a
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
?
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.