Page 1 of 1

Link Indexing

Posted: Mon Nov 09, 2009 2:01 pm
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