View Single Post
Old 10-14-2012, 01:00 PM   PM User | #2
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
I've not read your script...but if you want to hyperlink to that page, simply make the title of the result to be a link to that page.

How - Here's one way:

Maybe the pages' contents are dynamic because they all use one script whose HTML content changes. So maybe the url goes something like yourwebsite.com/index.php?id=2

Where 2 is the id of the game or whatever product it is.

So essentially, you also get the ID of the game/product from the database as you fetch other things. This makes the results easily dynamic.

Then do something like:

PHP Code:

while($r mysqli_fetch_assoc(mysqli_query($link,"SELECT * FROM games WHERE game_name LIKE '%search_term%'")){

$id $r['id'];


echo <<<CODE

<div>
<p><a href='mywebsite.com/index.php?id=
{$id}'The Title of The search results</a>
</p>

<p>
This is the newest game in the COD trilogy. The franchise has hit it perfect this time. 
</p>
</div>
CODE;

Using the above or whatever variation you choose, makes the results dynamic and therefore the title hyperlink relevant to the page.

The <<< i used in the code is the heredoc , that is if you didn't know about it.
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote
Users who have thanked Redcoder for this post:
camzenxbt (10-15-2012)