How to share a form between 2 websites
I have a form which I'd like to share between 2 different websites. The form is submitted and the data is entered into the database.
Right now each website has its own copy of the script and its own database, so when I want to make updates to the form, I have to make those changes twice. Is there a way to share the form between the 2 websites, yet make it look like its being served by each website like normal. I'm also wondering if it's possible to make all the data go to one database.
The basic options would be...
You can certainlly get the database to share information, just ensure the user you use to connect to it is allowed to connect from anywhere - not just localhost and you can connect to the database remotely.
You could include the form inside the other website as an iframe. There is a short tutorial here on howto do that.
In case the form is displayed inside a whole complex page i recommend placing the form inside its own page and iclude it in both websites using an iframe.
depends what you are looking for, if you use the same process script behind it, do what Mouhannad said, and add a field "return_url" so you come back on the right page.
if it is that you want to send the fields to 2 different locations, create a proxy script and post it by a curl to both locations.
链接地址: http://www.djcxy.com/p/19242.html上一篇: 从IFrame中删除边框
下一篇: 如何在2个网站之间共享表格