简体   繁体   English

PHP搜索表单,尝试在页面的不同部分显示结果

[英]PHP search form, trying to display results in different part of page

In my index.php I'm including all of the parts of the page. 在我的index.php中,我包括了页面的所有部分。 My structure is basically: 我的结构基本上是:

    <div id="page">
        <?php include('/home/content/16/7554016/html/template/head.inc.php'); ?>
        <?php include('/home/content/16/7554016/html/template/nav_below.inc.php'); ?>
        <div id="left"><?php include('/home/content/16/7554016/html/template/left.inc.php'); ?></div>
        <div id="body"><?php include('/home/content/16/7554016/html/template/body.inc.php'); ?></div>
        <div id="right"><?php include('/home/content/16/7554016/html/template/right.inc.php'); ?></div>
    </div>

<div id="footer"><?php include('/home/content/16/7554016/html/template/footer.inc.php'); ?></div>

I have a self submitting search form in the header. 我在标题中有一个自我提交的搜索表单。 But, want to display the results in the body. 但是,要在体内显示结果。 So, I put the results.inc.php in the body.inc.php . 因此,我将results.inc.php放在body.inc.php But, that obviously won't create a connection with the form in the head.inc.php . 但是,这显然不会与head.inc.php的表单建立连接。 How can I do this using all of the includes? 如何使用所有包含项执行此操作? Thank you. 谢谢。

What connection are you trying to create? 您想建立什么联系? If you display the results in the body using php, it doesn't have to be linked to the form, or within the form tags. 如果使用php在正文中显示结果,则不必链接到表单或表单标签中。 the php code will be executed in the order it is included. php代码将按照包含的顺序执行。

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

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