What i'm trying to do is have a form with two submit buttons. One will lead to one .php script and clicking the other will lead to another . Does anybody know how to do something like that or similar?
Printable View
What i'm trying to do is have a form with two submit buttons. One will lead to one .php script and clicking the other will lead to another . Does anybody know how to do something like that or similar?
your probably at the wrong place to ask for this but to get this thread out of the unawnsered list. try to rewrite your form.action using javascript, with a button onclick.
yah, that's probably what i need to do, but a question to that is do i put anything in the action (<form action=? >) or do i just leave the action part out?
What you need to do is det up 2 forms. IE
<form action="/cgi/formmail" method="post" enctype="application/x-www-form-urlencoded" target="_self">
<input name="realname" type="text" id="realname" size="20" maxlength="30">
E-Mail Address:<input name="email" type="text" size="20" maxlength="40">
Please provide us with as much information as possible concerning your goals.
<textarea name="info" cols="50" rows="20"></textarea>
<input type="submit" name="Submit"
<input name="Reset" type="reset" id="Reset" value="Reset">
</form>
Then do another form....
<form action="/cgi/formmail" method="post" enctype="application/x-www-form-urlencoded" target="_self">
<input name="realname" type="text" id="realname" size="20" maxlength="30">
E-Mail Address:<input name="email" type="text" size="20" maxlength="40">
Please provide us with as much information as possible concerning your goals.
<textarea name="info" cols="50" rows="20"></textarea>
<input type="submit" name="Submit"
<input name="Reset" type="reset" id="Reset" value="Reset">
</form>
With a different action. The action= part will be what the form gets sent to. Most time you will want to send to a php app thru the POST use.
Ie.. In the php app have
$realname = $_POST['realname'];
This will send the realname valu from the form into the php app.
Let me know if you have any other questions....
xmaddness
a'right thanks, that helps ^_^