PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Search form doesn't work when submitted

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Search form doesn't work when submitted

    Hello everybody,

    I read through the manuals, but I am still lost when it comes to creating a search from on my page (I'm just an amateur, sorry...)

    So I successfully created the index and if I open the search.php site everything works fine. I now wanted to add a search field on my page by using the following code (from the wrensoft-site) :

    <form method="get" action="http://www.vpi-schweiz.ch/zoom/search.php">
    <input type="text" name="zoom_query" size="20" />
    <input type="submit" value="Search" />
    <small> Results per page:
    <select name='zoom_per_page'>
    <option selected="selected">10</option>
    <option >20</option>
    <option >100</option>
    </select><br /><br />Match:
    <input type="radio" name="zoom_and" value="0" checked="checked" />any search words
    <input type="radio" name="zoom_and" value="1" />all search words </small>
    </form>



    It displays the button and the field, but when I enter a searchword and hit search, nothing happens. What am I missing?

    Any help is highly appreciated!

    Best regards - Ralph

  • #2
    The HTML code in your post above looks OK.

    What is the URL for the page where you pasted this code into?

    I had a look at your home page, but this code doesn't appear on your home page. So I can't check it.

    Comment


    • #3
      Good morning to Sydney (it's a bit earlier here...) and thx for the reply.

      I put it testwise on this site here (you may need to scroll a bit):
      http://www.vpi-schweiz.ch/seite29.html
      You could try a word like anlage. It should find several sites (at least it does if I do it directly on http://www.vpi-schweiz.ch/zoom/search.php)

      Regards, Ralph

      Comment


      • #4
        Your HTML is broken.

        On line 263 where you pasted the form code, this is what it looks like:

        Code:
            <div id="frag_10" style="text-align:left;" <form method="get" action="http://www.vpi-schweiz.ch/zoom/search.php">
                                        <input type="text" name="zoom_query" size="20" />
                                        <input type="submit" value="Search" />
                                        <small> Results per page: 
                                        <select name='zoom_per_page'>
                                        <option selected="selected">10</option>
                                        <option >20</option>
                                        <option >100</option>
                                        </select><br /><br />Match: 
                                        <input type="radio" name="zoom_and" value="0" checked="checked" />any search words 
                                        <input type="radio" name="zoom_and" value="1" />all search words </small> 
                                        </form>
            Gut zu wissen!
            </div></div>
        Note that the first div tag there is not closed with a ">" character. So it eliminated the form tag that followed.

        Change that first line by adding the character (in blue) as shown below:

        Code:
         <div id="frag_10" style="text-align:left;"[B][COLOR=blue]>[/COLOR][/B]<form method="get" action="http://www.vpi-schweiz.ch/zoom/search.php">
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Awesome!! Many thanks, Ray! As I'm not really familiar with HTML, I would never got it.

          Now it does exactly what I want. You have a new customer!

          Best regards, Ralph

          Comment


          • #6
            Search Engine question

            Good afternoon. I just downloaded the FREE version, V6.

            I have a little web site that I would like to add a search engine to. I'd like to put the search box on my main page, but would like it to search all the .htm and .html files located in the directory (where the main page also resides).

            I don't have a traditional address like [http://www.mywebsite.com]

            My main page (not public yet) is located here:
            http://home.comcast.net/~spartacus_33/Knucklehead/idiotxm.htm

            I have a couple hundred other .htm and .html files located in the Knucklehead folder.

            I would like to have the search box located ON idiotxm.htm, but to search all the .htm and .html files in the Knucklehead directory.

            Please help.... Thanks,
            Steve

            Comment


            • #7
              I'm very new to this too. I simply copied the code from above and changed my URL to this:

              <!-- BEGIN SEARCH SCRIPTING HERE -->
              <form method="get" action="http://home.comcast.net/~spartacus_33/Knucklehead/search.php">
              <input type="text" name="zoom_query" size="20" />
              <input type="submit" value="Search" />
              <small> Results per page:
              <select name='zoom_per_page'>
              <option selected="selected">10</option>
              <option >20</option>
              <option >100</option>
              </select><br /><br />Match:
              <input type="radio" name="zoom_and" value="0" checked="checked" />any search words
              <input type="radio" name="zoom_and" value="1" />all search words </small>
              </form>
              <!-- END SEARCH SCRIPTING HERE -->

              The search box shows up on my page but when I try to search for something, I get a new window that says:

              Sorry, you are not authorized to view this page.
              Suggested Actions

              Check the URL that you have typed and retry.


              The folder "Knucklehead" is where all the .html, .php and .zdat files all exist.

              Can you help me?

              Thanks,
              Steve

              Comment


              • #8
                You should just be able to enter in your home page as the starting point for the spider. Did you try this?

                Comment


                • #9
                  The folder "Knucklehead" is where all the .html, .php and .zdat files all exist.
                  I think you must be confused.

                  If I enter this URL into my browser I would expect to see the search template page if what you say is true.
                  http://home.comcast.net/~spartacus_33/Knucklehead/search_template.html

                  But I get a page not found error.

                  In fact even your home page generates an error,
                  http://home.comcast.net/~spartacus_33/Knucklehead/

                  So I think the URL must be wrong.

                  Comment


                  • #10
                    Originally posted by wrensoft View Post
                    I think you must be confused.

                    If I enter this URL into my browser I would expect to see the search template page if what you say is true.
                    http://home.comcast.net/~spartacus_33/Knucklehead/search_template.html

                    But I get a page not found error.

                    In fact even your home page generates an error,
                    http://home.comcast.net/~spartacus_33/Knucklehead/

                    So I think the URL must be wrong.
                    Oh yes, I'm confused. I've never dealt with search scripting or even heard of "Zoom" until today.

                    Turns out the file search_template.html was NOT in the Knucklehead directory. It is now.

                    The folder Knucklehead is simply the directory where all the files live. My main page is here, this is where the search code is:
                    http://home.comcast.net/~spartacus_33/Knucklehead/idiotxm.htm

                    BTW... the page idiotxs.htm is not finished yet, right now the only link that works is Earthwork, (earth.htm, second table... third from the right). I was trying to get a search script to work first. I was testing it on the Earthwork link.

                    Yes, I admit, I'm confused... but shouldn't take too much to set me straight.

                    I'm using Filezilla... I created a directory [Knucklehead] and dragged all the files (.htm, .jpg, etc...) in there.

                    Thanks,
                    Steve
                    Last edited by spartacus_33; Nov-19-2011, 07:16 AM.

                    Comment


                    • #11
                      Originally posted by spartacus_33 View Post
                      The folder "Knucklehead" is where all the .html, .php and .zdat files all exist.
                      Originally posted by spartacus_33 View Post
                      Turns out the file search_template.html was NOT in the Knucklehead directory. It is now.

                      Are you manually uploading the files? Are you sure the other files that you thought were there (namely "search.php" and the .zdat files) are actually there too?

                      If the first quote is true, then this should be your search page:
                      http://home.comcast.net/~spartacus_33/Knucklehead/search.php

                      When we go to this page with a browser (simply by clicking on the link), your server returns the message "Sorry, you are not authorized to view this page".

                      Your web server should only be doing this because of two possible reasons:
                      (a) The "search.php" file is not actually there.
                      (b) Your server is not setup to run PHP scripts.

                      For the latter, you should check with your web hosting company that they offer PHP support. It should be stated in the package details of your hosting account. If not, you should e-mail or call them.

                      If you are not familiar with what PHP is, you may want to check this FAQ:
                      Q. What is PHP, ASP, CGI or JavaScript? How do I determine which one I should use?
                      --Ray
                      Wrensoft Web Software
                      Sydney, Australia
                      Zoom Search Engine

                      Comment


                      • #12
                        OK, I entered:
                        http://home.comcast.net/~spartacus_33/Knucklehead/idiotxm.htm

                        ...as my "URL address of the web site to start scanning from".

                        I checked the first 2 items on the list on the next dialog box as the types of files to scan, (.htm, .html, .php, .asp, .cgi...)

                        I guess I should call my provider to see what platform they support, I checked .asp.

                        I used the default folder to create the index files on my hard drive.

                        I chose to upload the files myself and used FileZilla and dragged them into the same folder as all of my .htm, .htms files (Knucklehead) on the web server.

                        Now... this could be where I'm messed up too. I copied and pasted some .html code from another post into my file idiotxm.htm. Modified it as seemed logical:

                        <form method="get" action="http://home.comcast.net/~spartacus_33/Knucklehead/search.php">
                        <input type="text" name="zoom_query" size="20" />
                        <input type="submit" value="Search" />
                        <small> Results per page:
                        <select name='zoom_per_page'>
                        <option selected="selected">10</option>
                        <option >20</option>
                        <option >100</option>
                        </select><br /><br />Match:
                        <input type="radio" name="zoom_and" value="0" checked="checked" />any search words
                        <input type="radio" name="zoom_and" value="1" />all search words </small>
                        </form>

                        When I try to run the search from the file idiotxm.htm I get a page that says, :
                        Sorry, the page you were looking for could not be found.

                        Suggested Actions

                        Check the URL that you have typed and retry.


                        Perhaps it's bad code that copied... perhaps I should have used .php rather than .asp.

                        Thanks,
                        Steve

                        Comment


                        • #13
                          The file search.php is there. I'll check with my provider and see whether they support .asp (which also didn't work) or .php.

                          Thanks,
                          Steve

                          Comment


                          • #14
                            Well, my provider says they support, .php, .asp and .cgi.

                            Comment


                            • #15
                              I've abandoned ship. I tried a hosted search solution which is working.

                              Thanks,
                              Steve

                              Comment

                              Working...
                              X