Jump to content

PHP / Java newcomer question about two actions from one submit POST


jerryisgood

Recommended Posts

Greetings everyone, I'm new to both these boards and PHP.. I had php script built for me and have since been building upon it, trying to learn some new stuff along the way 

 

 

I have a form that currently does this...

 

 

 

<input type="submit" class="primaryAction" id="submit-" name="tfa_submitAction" value="submit">

 

<input type="hidden" value="294-ebbb9c4d4e37fd131788e258d9663332" name="tfa_dbCounters" id="tfa_dbCounters">

<input type="hidden" value="134518" name="tfa_dbFormId" id="tfa_dbFormId">

<input type="hidden" value="" name="tfa_dbResponseId" id="tfa_dbResponseId">

<input type="hidden" value="b40a6b1b2518fdfbbf03a9951e71ea75" name="tfa_dbControl" id="tfa_dbControl">

<input type="hidden" value="1278748831" name="tfa_dbTimeStarted" id="tfa_dbTimeStarted">

<input type="hidden" value="53" name="tfa_dbVersionId" id="tfa_dbVersionId">

 

up top, I have this:

 

<form method="post" action="formload.php">

 

 

What this does is run the formload.php  which basically fills out a form on a second website with the information entered on my form and submits it there... Now I'm trying to have the SAME submit button also initiate a second php file on my server, one that stores the information into datbase via Form Tools.

 

 

That code is:

 

 

<form action="http://www.mysite.com/myfolder/secondscript.php" method="post">

<input type="hidden" name="form_tools_initialize_form" value="1" />

<input type="hidden" name="form_tools_form_id" value="1" />

 

 

 

Will these play friendly together? Can you tell me if my submit button will successfully submit to the second script if I place that action with the other in the Header?

Link to comment
Share on other sites

You can't have a form submit to two locations. You will need to combine the code in both scripts into one file.

 

I had thought about doing this. Would this be as simple as copying and pasting one into the other or are there things that could cancel each other out? The PHP code part is the part that I'm not too familiar with. Thanks!

Link to comment
Share on other sites

Would this be as simple as copying and pasting one into the other or are there things that could cancel each other out?

 

It could be as simple as a copy and paste, but it might not be either.

Link to comment
Share on other sites

Would this be as simple as copying and pasting one into the other or are there things that could cancel each other out?

 

It could be as simple as a copy and paste, but it might not be either.

 

Is it safe to paste the two operations here in seeking advice?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.