How to give the search option for website ?

Discussion in 'PHP' started by premecorp, Apr 17, 2012.

  1. #1
    Hello Friends,
    I am working in a website where one search box is available, this website is for online training provider, so it has different pages for different courses. If anyone want to search by giving any course name the related course list or that particular course page should open. If anyone have any idea regarding this please help me and what are the different ways to achieve this means I have to maintain database or I can use xml also for this.

    Regards,
    Premashish
     
    premecorp, Apr 17, 2012 IP
  2. vineld

    vineld Greenhorn

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #2
    You should definitely use the database, it's usually much faster. If your website doesn't receive extreme amounts of traffic you can simply make the appropriate queries towards the database.
     
    vineld, Apr 17, 2012 IP
  3. Uploadables

    Uploadables Member

    Messages:
    100
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #3
    Remember when using a search function on site to prevent SQL Injections by parsing the input

    Also you will realise it will be better if you use the 'LIKE' function on the SQL Queries
     
    Uploadables, Apr 20, 2012 IP
  4. Arttu

    Arttu Member

    Messages:
    139
    Likes Received:
    2
    Best Answers:
    8
    Trophy Points:
    40