如何在2个网站之间共享表格 [英] How to share a form between 2 websites

查看:143
本文介绍了如何在2个网站之间共享表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张表格,我想在两个不同的网站上分享。表单被提交并且数据被输入到数据库中。

现在每个网站都有自己的脚本副本和自己的数据库,所以当我想对表单进行更新时,我必须进行两次更改。有没有办法在这两个网站之间共享表格,但看起来像是正常情况下每个网站的服务。我也想知道是否有可能将所有的数据都放到一个数据库中。

解决方案

基本选项是.. 。


  • 您可以使用html iframe 在多个网站上显示相同的表单。

  • 您可以在站点之间复制表单代码

  • 如果两个网站都在同一台服务器上,您可以使用php include来包含表单可能在某些情况下,即使它们不是)



您可以确定地获取数据库以共享信息,只需确保您使用的用户连接到它可以从任何地方连接 - 不只是本地主机,你可以远程连接到数据库。


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 could use an html iframe to show the same form on multiple websites.
  • You could copy the form code between sites
  • If both websites are on the same server, you may be able to get a php include to include the form (this is possible in some cases even if they are not)

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.

这篇关于如何在2个网站之间共享表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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