Passing On Keywords[URGENT]!!!

Discussion in 'HTML & Website Design' started by killadiver, Jan 1, 2010.

  1. #1
    I need help on a project,


    I want to create a search engine that passes on keywords, but have not a clue.
    this is not really my strong point.

    So basically i want it to pass on keywords then display them on a webpage like google.


    If you can could you do an example down below, of google then that would be great.

    This is In Php Programming Language
     
    killadiver, Jan 1, 2010 IP
  2. killadiver

    killadiver Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Guys I need this Fast, any help would be fine, any website you tell me
     
    killadiver, Jan 1, 2010 IP
  3. DocuMaker

    DocuMaker Active Member

    Messages:
    427
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Hmmm... okay. Real quick.

    Pass a keyword through a link, like this: http://www.yoursite.com/special_page.php?param=KEYWORD

    (Change the website name, special_page.php, and KEYWORD part to whatever you need them to be.)

    Then on the page that will catch the parameter (special_page.php in this tiny tutorial), paste this where ever you want the keyword to appear: <?php $_GET['param']; ?>

    That tells special_page.php to display whatever comes after "param." In the example above, it's gonna display KEYWORD.

    That's all, I'm sure.
     
    DocuMaker, Jan 1, 2010 IP
  4. killadiver

    killadiver Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks Ill test it out, do you know what to do for spaces, for example if they put in "cd covers"
     
    killadiver, Jan 1, 2010 IP
  5. DocuMaker

    DocuMaker Active Member

    Messages:
    427
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Okay for that, you're going to have to modify the code a bit. The final version should resemble something like this:

    (I need to clarify...)

    <?php
    $_GET['param'];
    $keyword = str_replace(" ", "%20", $param);
    ?>
    (Put that at the top of the php results page)

    Then instead of using <?php $_GET['param']; ?> where the KEYWORD should go on the results page, use <?php echo $keyword ?>

    I think that should work. Let me know if it doesn't.
     
    Last edited: Jan 1, 2010
    DocuMaker, Jan 1, 2010 IP
  6. killadiver

    killadiver Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ok thanks for your help, you are a wonderful and genrous person
     
    killadiver, Jan 2, 2010 IP