简体   繁体   English

如何将表单数据发送到两个服务器

[英]how sending form data to two server

I have a html form. 我有一个HTML表单。 In this form I have 3 input: "name", "mobile" and "email", with a submit button. 在这个表单中,我有3个输入:“name”,“mobile”和“email”,带有提交按钮。

In this form I use mailchimp and form inputs send to mailchimp. 在这种形式,我使用mailchimp和表单输入发送到mailchimp。

I want do this: 我想这样做:

  1. send all 3 input to mailchimp.(It's ok now and I can do it) 将所有3个输入发送到mailchimp。(现在可以,我可以做到)
  2. send name and mobile input to my sms server(sms server give me a link that I send my input it with Post or Get method) 发送名称和移动输入到我的短信服务器(短信服务器给我一个链接,我用Post或Get方法发送我的输入)

I can do this 2 case separate, but I can not do together. 我可以分开2个案例,但我不能一起做。 because form can not have 2 action. 因为表格不能有2个动作。

How I can solve this problem? 我怎么能解决这个问题?

so tnx :) 所以tnx :)

Have your form post to an intermediate PHP script. 将表单发布到中间PHP脚本。 That script would then subsequently POST to mail chimp, and then execute another post to your SMS gateway using something like cURL . 然后该脚本将POST邮寄给黑猩猩,然后使用类似cURL的东西执行另一个帖子到您的SMS网关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM