简体   繁体   中英

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. 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 . But, that obviously won't create a connection with the form in the 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. the php code will be executed in the order it is included.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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