simple searchbox in php

Discussion in 'PHP' started by Joobz, Jun 5, 2007.

  1. #1
    does anyone have a basic script page with a searchbox? I don't know how to get the contents of a search to populate a $variable ... what's the syntax?
     
    Joobz, Jun 5, 2007 IP
  2. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #2
    what type of search you want to do?plz mention in details.
     
    coderbari, Jun 5, 2007 IP
  3. Joobz

    Joobz Peon

    Messages:
    598
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I want to have a search form and when I click "search" it will populate the variables I have set on the page with that search term - I'm a little fuzzy on how to do that.
     
    Joobz, Jun 5, 2007 IP
  4. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #4
    for the most part, these are used when the website's content is stored within a database. of course you could keep your pages inside of an array and open a connection to each one and match against the search term but i would advise against it as it could end up being really slow (depending on the amount of pages) and it's just plain retarded. if you want a search option, toss your content into a database.
     
    ansi, Jun 6, 2007 IP
  5. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you want so simple, use google search box for your site.........
     
    tamilsoft, Jun 6, 2007 IP
  6. veckd

    veckd Peon

    Messages:
    1,065
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ahah thats what i was gonna say lmao. great minds think alike =]
     
    veckd, Jun 6, 2007 IP
  7. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #7
    olddocks, Jun 7, 2007 IP
  8. Joobz

    Joobz Peon

    Messages:
    598
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Actually, I am talking about pulling results from my own mysql databases. The results are not other web sites but people search records
     
    Joobz, Jun 7, 2007 IP
  9. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #9
    visit www.phpclasses.org.in this site u can find many search scripts which pull results from mysql database.
     
    coderbari, Jun 7, 2007 IP
  10. Free Directory

    Free Directory Peon

    Messages:
    89
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Using a searchbox and a mysql database it's not a hard job to do.
    You just have to set a standard page for the search results and use a sql query to fetch output from database.
    Question: what will be searched? many columns? You plan to have a search box with filters?
    I'll gladly help, if you need simple one, but we really need more info about it:)

    Contact me if you want, by pm.
    Regards,
    Victor
     
    Free Directory, Jun 7, 2007 IP