1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do i make a search bar that searches through my website?

Discussion in 'Programming' started by Kurt Whittingham, Apr 17, 2012.

  1. Kurt Whittingham

    Kurt Whittingham Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #41
    so how would i code the header image with the search bar next to it?

    and what code of the search bar would go into the search.php
     
    Kurt Whittingham, Apr 27, 2012 IP
  2. Arttu

    Arttu Member

    Messages:
    139
    Likes Received:
    2
    Best Answers:
    8
    Trophy Points:
    40
    #42
    All of it.

    If you don't know any html I suggest that you download a website template (just google free website templates), but even if you download a template I recommend that you learn atleast some html.
    http://www.w3schools.com/html/default.asp


    Also, if you are gonna use that code (originally intended to be just a quick example) then add
    $keyword = mysql_real_escape_string($keyword);
    Code (markup):
    after
    require('connect.php');
    Code (markup):
    to prevent sql injection.
     
    Arttu, Apr 30, 2012 IP
  3. Kurt Whittingham

    Kurt Whittingham Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #43
    I know html, what i mean is how do i get the search bar next to the header image. but when someone searches the reuslts show us in the main area of the page?
     
    Kurt Whittingham, Apr 30, 2012 IP
  4. Arttu

    Arttu Member

    Messages:
    139
    Likes Received:
    2
    Best Answers:
    8
    Trophy Points:
    40
    #44
    Just put this part:
    
    <form action="search.php" method="get">
    <input type="text" name="kw" />
    <input type="submit" value="Search" />                  
    </form>
    
    HTML:
    after or before the header image code and the rest wherever you want the results. Did I still misunderstand you?
     
    Last edited: May 1, 2012
    Arttu, May 1, 2012 IP
  5. Kurt Whittingham

    Kurt Whittingham Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #45
    yes this works, thanks, sorry about the misunderstanding.. im still getting used to all codes!
     
    Kurt Whittingham, May 1, 2012 IP
  6. Kurt Whittingham

    Kurt Whittingham Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #46
    Hello mate, i was wondering if you could help me with something else. i want to change the font of the data that is being pulled from the table how do i do this?
     
    Kurt Whittingham, May 6, 2012 IP
  7. warek44

    warek44 Greenhorn

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #47
    I don't know about cache but the strange thing is I can not see the impressions in Google website for couple of days back and people do come from google which I have seen in Google Analytics, so something is going on with Google.
     
    warek44, May 6, 2012 IP
  8. Kurt Whittingham

    Kurt Whittingham Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #48
    sorry what are you talking about??
     
    Kurt Whittingham, May 6, 2012 IP