Search & Result pages

Discussion in 'PHP' started by Lucy, Jun 2, 2007.

  1. #1
    Hi,

    I have created a PHP page with a dynamically populated selection list and submit button. And another php page that is suppose to display the results in a table from MySQL.

    But haven't got the code quite right.

    Does anyone know some good tutorials for building search and results pages in PHP?
     
    Lucy, Jun 2, 2007 IP
  2. manilodisan

    manilodisan Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Maybe you could share the code and we'll try to improve it.
     
    manilodisan, Jun 2, 2007 IP
  3. Lucy

    Lucy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I wish I could but I can't because it's an assignment and I could get into trouble.

    Basically, what I have is a page with a form and then another page that is suppose to display the results.

    I can't seem to find too much info. on this on the web.
     
    Lucy, Jun 2, 2007 IP
  4. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Which part are you up to? I will give pointers but need to know if you are stuck at making the form, setting up the DB getting the form data into the database with PHP or retrieving data from the database.
     
    krt, Jun 2, 2007 IP
  5. Lucy

    Lucy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm stuck on the results.php page.

    On the search.php page I have a dynamically populated search list - linked to a table but there's a option called "Any" which if selected will retrieve all of the options within the selection list. But I need it to retrieve the result if only 1 of the options is selected also.
     
    Lucy, Jun 3, 2007 IP
  6. Lucy

    Lucy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Also another problem is that the options are represented by a number in another column of the table in MySQL, and I have to also link that to the options in the selection list.
     
    Lucy, Jun 3, 2007 IP
  7. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #7
    From what I understand you will have to use something like a check box. Can you be more clear?
     
    MMJ, Jun 3, 2007 IP
  8. Lucy

    Lucy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I already got a selection list (otherwise known as a drop box)...
     
    Lucy, Jun 3, 2007 IP