使用PHP包含函数时HTML表单失败 [英] HTML form failing when using PHP include function

查看:111
本文介绍了使用PHP包含函数时HTML表单失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在尝试创建一个可以从多个页面访问的动态表单。我创建了表单,并使用include()函数将其包含在一个主要的PHP页面中。


现在,当我运行表单时,似乎忽略了< form>完全标记。我希望表单将数据传递给另一个PHP脚本以进行验证并转储到数据库中。表单只会将详细信息传递回运行表单的同一页面。


当我单独运行脚本时,表单可以正常运行,但不能通过其他页面运行使用include()。


任何建议或帮助都将非常感激。在此先感谢,


Vladimir

Hi,

I''m trying to create a dynamic form that is accessed from multiple pages. I''ve created the form and included into one of the main PHP pages using the include() function.

Now, when I run the form, it seems to be ignoring the <form> tag entirely. I want the form to pass the data to another PHP script for validation and dumping into the database. The form will only pass the details back to same page the form is run from.

The form works as it should when I run it''s script individually, but not through another page using include().

Any suggestions or help would be great appreciated. Thanks in advance,

Vladimir

推荐答案

在浏览中查看您的来源并查看HTML是您所期望的。


Dan
View your source in your browse and see the HTML is what you expect.


Dan


嗨Dan,


感谢您的快速回复。


我已经玩了另一个游戏,并决定把它剥离到它的基本形式。我以相同的形式添加到index.php脚本中。 HTML正确回显并在视图源中显示正确。


表格仍然不会移动到另一页。


弗拉基米尔
Hi Dan,

Thanks for the speedy reply.

I''ve had another play with it and decided to strip it down to it''s basic form. I added in an identical form into the index.php script. The HTML is echoing out correctly and appears correct in view source.

The form will still not move to another page.

Vladimir


我们是如果我们要帮助你的话,必须看看源代码,HTML和PHP。
We''re going to have to see the source code, HTML and PHP, if we''re going to help you.


这篇关于使用PHP包含函数时HTML表单失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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