PassMark Logo
Home » Forum

Help when putting search box in a header

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 7 Days
    Junior Member
    • Feb 2009
    • 3

    #1

    Help when putting search box in a header

    I have opted to put a search box in the header of my document. Using php for everything, site and zoom. Problem I am having is that when I try to do a search, I get a problem with it not finding the search database because it is looking in the subdirectory of whatever page the viewer is on at the time.

    Here is an example of the type of error code I get:

    The requested URL /campingsupplies/search.php was not found on this server.

    How do I get it to go to just /search.php each time?

    Thanks!
  • 7 Days
    Junior Member
    • Feb 2009
    • 3

    #2
    I had searched the forum before posting the above but could not find a solution. Is there anyone out there who might know how to do this? This is my first attempt at using this product and although I think it is great, I've hit a major snag right off the bat.

    Thanks!

    Comment

    • David
      Administrator
      • Dec 2004
      • 4714

      #3
      You just need to change the URL in the action section of the HTML seach form.

      So instead of this,
      <form method="get" action="search.php">
      you use this,
      <form method="get" action="/search.php">

      Comment

      • 7 Days
        Junior Member
        • Feb 2009
        • 3

        #4
        Thanks. In my case it needed:

        <form method="get" action="/search/search.php">

        But your response most certainly lead me in the right direction to solve the problem.

        Great product! Thanks again.

        Comment

        Working...