PDA

View Full Version : multiple action on a html submit button in php script


ChronicleX.com
04-11-2005, 02:20 PM
is there a way to get both of them to perform for me when a user clicks 1 submit button (i said it can't be done but am looking into it any way)

<form name="form" method="POST" action="<%= request.servervariables("script_name") %>" ACTION="#">

<form method="post" action="<? echo $script; ?>">

marek_mar
04-11-2005, 05:30 PM
Why? CAn't you let one of the scripts do both jobs?

ChronicleX.com
04-12-2005, 04:04 PM
what do you mean?

marek_mar
04-12-2005, 04:42 PM
Make one form and one script to process the form?

ChronicleX.com
04-13-2005, 09:58 AM
yeh i said this but my boss wants it all done in one submit button to make it as simple for the users as possible.

bfsog
04-13-2005, 10:07 AM
You can. lets say your form has a textbox called "age" and a textbox called "fullname". The operations needed are to tell the user


Your name is is $_POST['fullname'] and you are $_POST{'age'] years of age.
Then the page is to be redirected to a different page.


Having a script that does both is a lot simpler.

ChronicleX.com
04-13-2005, 01:21 PM
they are not actions tho

do you mean have one action in 1 form then when they press submit it takes you to the 2nd page where a 2nd form is and a 2nd action.

what i want to know is if you can have 1 form 1 submit button and 1 page that does 2 actions.

marek_mar
04-13-2005, 03:16 PM
What "actions"? I'm sure you can.

delinear
04-13-2005, 04:03 PM
What is it exactly that you're trying to do? Give us some more info and we may be able to help more. At the moment the thread seems to be going around in circles :confused:

ChronicleX.com
04-13-2005, 04:24 PM
ok i have a asp page with an html from in it what i'am trying to do if it's possible is add php to an asp page and get a html from to run a php action and an asp action when the user clicks submit on the form. It then pulls the users email from ladap and sends them and webmaster an email with the form infomation the form also converts in .xml on the asp side.

so php uses ldap to pull users email

and asp converts form input data into a .xml file

and at the end this all gets sent with a link to the xml file to the user and webmaster

thats the best i can explan it.

ChronicleX.com
04-13-2005, 05:22 PM
nm i got it

thanks alot anyway