Hi,
How can I post the variables to two php pages?
Ex: <form name="form" method="post" action='login1.php';'alogin1.php'>
.....
.....
<input type="submit" name="Submit" value="Tamam">
This code didn't work.
post the variables to two pages?????
Moderator: General Moderators
-
hakiki_dolphin
- Forum Newbie
- Posts: 9
- Joined: Thu Jan 30, 2003 3:00 pm
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
-
superwormy
- Forum Commoner
- Posts: 67
- Joined: Fri Oct 04, 2002 9:25 am
- Location: CT
You can't using strait X/HTML, but you could use fsockopen or that PostToHost function I keep seeing around to make the second post to the second page.
http://www.php.net/fsockopen
http://www.faqts.com/knowledge_base/vie ... 039/fid/51
http://www.php.net/fsockopen
http://www.faqts.com/knowledge_base/vie ... 039/fid/51
I don't know if that works, but you can bubble the onSubmit-event in Javascript.
If you look at the code below, you'll notice
a) document.form1.target - same as target in an <a href>. Thus you can easily use it to submit into invisible frames)
b) document.form1.action - which basically allows you to dynamically change the <form action="fileblabla.php"> tag.
If you look at the code below, you'll notice
a) document.form1.target - same as target in an <a href>. Thus you can easily use it to submit into invisible frames)
b) document.form1.action - which basically allows you to dynamically change the <form action="fileblabla.php"> tag.
Code: Select all
<script language=javascript>
function submitForm(path)
{
if (path=="whatever.php")
document.form1.target="_blank";
else document.form1.target="_self";
document.form1.action=path;
document.form1.submit();
}
</script>
<FORM name="form1" action="submit_to_wherever.php" method="post" onSubmit="return false;">
bla bla form bla bla
<input type=button onClick="submitForm('submit_form.php');" value='Submit Form'>