Click here to Skip to main content
15,880,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want to link two php pages on submition of the form through main page as
HTML
<form name="form1" method="post" action="npcc_details.php","npcc_sendmail.php">
</form>

But it is not working.
Posted
Updated 5-Aug-12 21:44pm
v2

You cannot do it the way you want, but what you can do is :
simply create a function that does the task of npcc_sendmail.php and then re-write some part this ways:
HTML
<form name="form1" method="post" action="npcc_details.php">
</form>


in npcc_details.php include the file npcc_sendmail.php function. and then call the function with required parameter.

I wanted to show another way, but it didn't work as I expected. It creates a new window, anyway, try the above one :)

Well, the second one is added. Simple example, you would understand
HTML
<script>
	function submit_()
	{
		document.forms['you'].action="x1.php";
		document.forms['you'].target='x1_';
		document.forms['you'].submit();
		document.forms['you'].action="x2.php";
		document.forms['you'].target='x2_';
		document.forms['you'].submit();
		return false;
	}
</script>
<form name='you' action='' target=''  onsubmit='return false'>
	<INPUT TYPE='text' name='test'>
	<INPUT TYPE='SUBMIT' name='SUBMIT' onclick="return submit_()">
</form>
<iframe id='x1_' name='x1_'>
</iframe>
<iframe id='x2_' name='x2_'>
</iframe>
 
Share this answer
 
v2
Its cant possible..

you can redirect for specific page..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900