Recently Searched Help

Status
Not open for further replies.

Zero

Active Member
639
2008
58
0
My script is based of php but does not use MySQL. But i can make a database need be.

My goal:

1. index.php to show in a box top 20 most recently searched.
2. search.php to show the most searched.
3. Have a top500.php displaying the top 500 searched words.
4. Some how compile all the searched terms into a site map.

I really want to learn this. I am going to school as a web designer, but we are still on HTML and CSS. Any contributions would be greatly appreciated.

The why my site works is as fallows:

1. Index.php has just a search box.
2. Once they have clicked search it displays all the results.

What does my search form look like?

PHP:
<div id="search_main">
        <form id="search" action="search.php" class="form_search" method="get" name=
        "search">
          <input id="term" type="text" placeholder="Enter the torrent you want here..."
          name="search" value="" class="search_input" /> <input id="submit" type="submit"
          value="Search" name="search_button" class="search_button" />
        </form>
      </div>
How are links displayed after a term has been displayed?

domain.com/search.php?search=wjunction&search_button=Search

Not sure if this really matters.

Please let me know how all this could be accomplish to work. Thank you for reading this.
 
Last edited:
1 comment
HOW?

Ok you create a simple database with 3 fields. Searched for , last searched and times searched.
You can make these names anything you want. Then add code to add the searched for and add 1 to the times searched and add the last searched date with current date and time.
If searched for exists in database just add 1 to times searched and update last searched.


Also add code in search.php to pull the searched for with the highest times searched count from database and use it as value in the form.


Check w3schools for basic php/mysql code to do this.
 
Last edited:
Status
Not open for further replies.
Back
Top