BLOG DESIGN SOLUTIONS What you have just done

BLOG DESIGN SOLUTIONS What you have just done is added a Fulltext index to the posts table on the title, summary, and post fields. Now when the database text is searched (I ll show you how in the next section), it will search all three fields, giving priority to the title, then the summary, then the post. So if you search for the word donkey , and one of your posts is titled Donkey Rides while another of your posts just has the word donkey somewhere in the post, Donkey Rides will be returned first in the search results because title is deemed to be more important than the post. And now to create the search results page, which will show the matching blog posts when someone uses the search form on any of your pages. The search results will look something like Figure 7-22. Figure 7-22. Search results page Here is the search results code in its entirety. Copy it into a new document and save it to your root directory as search.php.

Leave a Reply