473,385 Members | 1,292 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
1 1608
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Vincent M. | last post by:
Hello, I have a form which allow to submit a file, I'd like to block the submit buton once it has been clicked, so I tried: function SubmitNow(item){ if(item.value=="Please wait") { return...
2
by: Margaret Werdermann | last post by:
Hi all: I'm having a nasty time with a particularly difficult piece of code and was hoping someone might be able to help me. I have a FormMail form that originally worked perfectly. Then, I...
7
by: sindre | last post by:
Hi, Some place I use links to submit forms instead of a submit button. The way I have done this is: <a href="javascript:document.getElementById('<?php print "delete$i"...
1
by: Anderh | last post by:
hi all, I have using iframe for call php file called , I wnat submit this form inside iframe from parent form in main page but I codnt make it. <input type="button" id="s" name="s" value="submit...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.