If you know what ids go with what links, you can manually set it up. Otherwise, you will have to dynamically create the links via a query to get the categories, and use the ?id= suffix to the URL.
If you google it, you'll find loads of information on grabbing information from the url, and from a database. It's just a matter of thinking it through thoroughly what you want to do.
PHP is logical, so as long as you are logical, there shouldn't be problems.
Here's something I used (I use to do a "dynamic" news/stories front-page):
<?php
function run_query($table, $where, $order, $limit)
{
$query = 'SELECT * FROM `'.$table.'`';
if($where){ $query .= ' WHERE '.$where; }
if($order){ $query .= ' ORDER BY '.$order; }
if($limit){ $query .= ' LIMIT '.$limit; }
if($debug_sql === TRUE)
{
print_r($query.'<br />');
}
$result = mysql_query($query) or die('<font style=\\'font-weight: bold; color: #f00;\\'>mySQL Error:</font> '.mysql_errno().'<br />'.mysql_error());
return $result;
}
$result = run_query('majorcalls', '', 'id DESC', 5);
if(mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_array($result))
{
$tags['Main_Content'] .= '<div class="article">
<span class="title">';
$tags['Main_Content'] .= $row['Title'].'</span>
<p class="story">';
$tags['Main_Content'] .= $row['eDate'].'<br />'.$row['Intro'].'<br />
<a href="http://'.$_SERVER['HTTP_HOST'].'/read.php?page=majorcalls:'.$row['id'].'">Read More . . .</a></p>
<span class="posted">'.$row['Posted'].'</span>
</div>';
}
}
?>
That should put you on the right path. . .
I use the page variable in the url to pass 2 items of information: what category they want to read, and what article/story. I separate them by a colon. In my read script, I explode the string on the colon, and use them respectively in the query.
It would seem to me that you would want to put a switch() statement in there to handle the redirection.
~Brett