A few questions about PHP blocks in relation to search function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Newman

    #1

    A few questions about PHP blocks in relation to search function



    i am developing a web based database using PHP and mySQL.

    Want the search interface to display a message "No results found" if search
    unsuccessful .

    Here's how I was proposing to accomplish this.

    Two PHP scripts

    (A) A search interface mainly html with embedded PHP block that displays a
    search form.
    (B) An PHP script that is invoked

    Inside the second script (B) I will test if no rows returned (no results
    found). If this is the case I will invoke the search page (A) and pass a
    parameter to the script. This will set a variable in the PHP block to echo
    (display) "No results found" .

    Does this seem a reasonable solution?

  • Geoff Berrow

    #2
    Re: A few questions about PHP blocks in relation to search function

    Message-ID: <0001HW.C0F420C 600091364F04075 00@news.bigpond .comfrom
    Chris Newman contained the following:
    >Two PHP scripts
    >
    >(A) A search interface mainly html with embedded PHP block that displays a
    >search form.
    >(B) An PHP script that is invoked
    >
    >Inside the second script (B) I will test if no rows returned (no results
    >found). If this is the case I will invoke the search page (A) and pass a
    >parameter to the script. This will set a variable in the PHP block to echo
    >(display) "No results found" .
    >
    >Does this seem a reasonable solution?
    Yes, but there is no reason why you could not do it all with one script.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    Working...