marcfolio Posted July 10, 2008 Share Posted July 10, 2008 I have a from that I need to do 2 things with the values. I can do both seperately but I need them to happen either at the same time or after one's complete. FIRST, the form post the data and PHP writes it to a MySQL database, I then need the informtion passed to a ARP3 script that adds the data to another separate database. The post variables that I can get to work for the ARP3 is the following: <FORM name="form1" method="post" action="http://www.balancemydiet.com/cgi-bin/arp3/arp3-formcapture.pl Is there anyway to post the variables twice? HELP. Link to comment https://forums.phpfreaks.com/topic/114174-post-to-mysql-then-send-the-form-values-to-another-url-help/ Share on other sites More sharing options...
ratcateme Posted July 10, 2008 Share Posted July 10, 2008 i dont know what functions the ARP3 script has but you could add a line onto the end of your php script header('Location: http://www.balancemydiet.com/cgi-bin/arp3/arp3-formcapture.pl?id='.$id); make $id to be it id of the row you insert into th database then find that row and insert it into the other DB Scott. Link to comment https://forums.phpfreaks.com/topic/114174-post-to-mysql-then-send-the-form-values-to-another-url-help/#findComment-587094 Share on other sites More sharing options...
marcfolio Posted July 11, 2008 Author Share Posted July 11, 2008 Figured it out. Your solution would have worked if it was another php form. Anyway this is my solution. Basically it uses javascript to submit the form again. echo '<body onLoad="document.form1.submit()">'; echo '<FORM name="form1" method="post" action="/cgi-bin/arp3/arp3-formcapture.pl">'; echo '<input type="hidden" name="first_name" value="'.$firstName.'"/>'; echo '<input type="hidden" name="email" value="'.$email1.'"/>'; echo '<input type="hidden" name="source" value="134" />'; echo '<input type="hidden" name="tracking_tag" value="bajaliving" />'; echo '<input type="hidden" name="id" value="3">'; echo '<input type="hidden" name="extra_ar" value="">'; echo '<input type="hidden" name="first_name_man" value="1">'; echo '<input type="hidden" name="subscription_type" value="E">'; echo '</body>'; Link to comment https://forums.phpfreaks.com/topic/114174-post-to-mysql-then-send-the-form-values-to-another-url-help/#findComment-587301 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.