单个表单提交的两个操作 [英] two actions on single form submit

查看:87
本文介绍了单个表单提交的两个操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好吧


我的表单在提交时发布到第三方网站..现在我想在将值发布到第三方网站之前将文本框值存储在我的数据库中..


提前感谢

hi everybody

my form is posted to an 3rd party site on submit.. Now i want to store the textbox values in my database before posting the values to the 3rd party site..

thanks in advance

推荐答案


hi everybody


我的表单在提交时发布到第三方网站..现在我想在将值发布到第三方网站之前将文本框值存储在我的数据库中..


提前感谢
hi everybody

my form is posted to an 3rd party site on submit.. Now i want to store the textbox values in my database before posting the values to the 3rd party site..

thanks in advance



你好jeevik,


我不认为这是''可以在一个表单上执行两个操作。


也许您可以将数据发送到您站点上的页面,将信息读入您的数据库(使用所有的uesual securoity检查)然后通过另一个隐藏的表单将数据转发给第三方。


我认为第二种形式必须以某种方式提交。


不幸的是,你会想出某种''软糖'作为一个来自一个动作。


干杯

nathj

Hi jeevik,

I don''t think it''s possible to have two actions on one form.

Perhaps you couldpost the data to a page on your site, read the information in to your database (with all the uesual securoity checks) then forward the data on to the 3rd party via another, hidden form.

I think the second form would have to submit itself somehow.

Unfortunatley you are going to have come up with some sort of ''fudge'' as one from = one actions.

Cheers
nathj


实际上可以从php发送帖子数据。几天前看到一个例子......应该给它添加书签(该死的!)但我相信它隐藏在php手册中的某些库中链接


这绝对是这样的,除非您想使用ajax然后在提交后发布到您自己的网站
it is actually possible to send post data from php. saw an example a couple of days ago... should have bookmarked it (damnit!) but i believe it was hidden in some library in the php manual link

This is definately the way, unless you want to use ajax and then post to your own site upon submit


大家好,


你可以使用javascript来捕获提交事件,打开一个新窗口,在后台调用一个php脚本将数据复制到数据库,然后正常处理初始表单的提交。


问候紫色
Hi all,

you could use javascript to trap the submit event, open a new window, make a call to a php script in the background to copy the data to the database and then process the submit of the initial form normally..

Regards Purple


这篇关于单个表单提交的两个操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆