Results 1 to 4 of 4

Thread: Help with Php includes

  1. #1
    Join Date
    Sep 2007
    Location
    N.C.
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Help with Php includes

    Im trying to figure out how to place a php include link within a html form, so that once your hit submit, it just loads the results in a include.

    this is the code...

    <form action="main.php?section=results" id="cse-search-box">
    <div>
    <div align="right">
    <input type="hidden" name="cx" value="partner-pub-0730517514905995:z1dlz0-b5x4" />
    <input type="hidden" name="cof" value="FORID:10" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Search" />
    </div>
    </div>
    </form>
    <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>


    This is the site, and the result page.

    http://www.hbculive.net/main.php
    http://www.hbculive.net/results.php


    once you hit the search button, it just takes me to a blank page. Can anyone help?

  2. #2
    Join Date
    Sep 2008
    Posts
    56
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default

    Hi,

    Looks to me that you have corrected called the PHP script upon the submission of the form, sounds me that you have not written or echoed anything on results.php that is why you are not getting any output. If you can show me what you are writing in results.php I might be able to assist better.

    Regards,

    Maneet

    Lexolution IT Services
    Web Design Services

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    PHP Includes are not like frames, or javascript. While frames just make a frame:
    Code:
    <frame scr="blah" />
    They do not take the code FROM the frame and PUT it in the document, they just take the frame tag, as a copy tag. The php include() will take something from another document and then put it in the document that you've put the include() in. And it will not change - unless there is dhtml in the included page. My answer to you is Ajax.
    I cannot help you with that part. Try searching dynamicdrive.com for ajax.
    Jeremy | jfein.net

  4. #4
    Join Date
    Sep 2007
    Location
    N.C.
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Results</title>
    </head>

    <body><div id="cse-search-results"></div>
    <script type="text/javascript">
    var googleSearchIframeName = "cse-search-results";
    var googleSearchFormName = "cse-search-box";
    var googleSearchFrameWidth = 820;
    var googleSearchDomain = "www.google.com";
    var googleSearchPath = "/cse";
    </script>
    <script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
    </body>
    </html>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •