Saturday 15 September 2012

php - How do I perform 2 actions with 1 submit button? -


I have 1 submit button in my form but there are a lot of posts that need to be done except 2 tasks, except that There are 2 different types of actions in this issue, first to post on a .php file, and the second action must be posted to MailChimp.

For example, here's a form:

  & lt; Form id = "form-signup_v1" name = "form-signup_v1" method = "post" action = "http://mydomain.us10.list-manage2.com/subscribe/post"> & Lt; Input type = "hidden" name = "U" value = "fadf23525acar3fad" & gt; & Lt; Input type = "hidden" name = "id" value = "3234davca4er" & gt; & Lt; Input id = "MERGE0" name = "MERGE0" placeholder = "my email address" type = "text" data-verification = "[EMAIL]" & gt; & Lt; Button class = 'buttonmain' id = "buttoned" type = "submit" & gt; Submit & lt; / Button & gt; & Lt; / Form & gt;  

Ideally, I want this form in action = "login.php" and then anyway on http://mydomain.us10.list-manage2.com Post / Subscribe / Post with required fields:

  & lt; Input type = "hidden" name = "u" value = "fadf23525acar3fad" & gt; & Lt; Input type = "hidden" name = "id" value = "3234davca4er" & gt;  

How can I do 1 to submit these 2 tasks?

In advance thank you

I login It is resolved by adding some additional PHP code to the php file. I used curls hope it helps someone


No comments:

Post a Comment