Link Indexing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dimxasnewfrozen
Forum Commoner
Posts: 84
Joined: Fri Oct 30, 2009 1:21 pm

Link Indexing

Post by dimxasnewfrozen »

I'm essentially trying to make a simple blog however i'm not sure how to get the links to work right.

Ultimately I want the links the be displayed by ID

Code: Select all

 
$query  = "SELECT * FROM pages ORDER BY ID DESC";
        $result = mysql_query($query);
 
        while($row = mysql_fetch_array($result, MYSQL_ASSOC))
        {
        echo "<font size=3><a href=>" . $row['title'] . "</a></font><br/>" . 
             $row['subtitle'] . "<br/><br/>";
        } 
 
This works correctly, yet i'm not sure how to make the link based on the ID. I want something {$_SERVER['PHP_SELF']}?id=$link_ID

then run a different query to display the contents of that ID. something simple like... http://www.example.com?id=3
Post Reply