Database output function Please review the following code and list all the coding errors and poor coding practices that you can see in this code.

function output()
{
    // Check authorization
    if(is_authorized())
    {
        $authorized = true;
        include('/path/to/' . $_REQUEST['module'] . '.php');
    }
    echo "&lt;ul&gt;"
    $conn = mysql_connect( "dbserver.com:6789", "dbyuser", "dbpassWd" );
    mysql_select_db( "kum", $conn ); // selects a database
    $q = " SELECT * FROM main WHERE id &gt; " . $_GET["id"]. ";";
    $res = mysql_query( $q, $conn);
    while( $row = mysql_fetch_assoc( $res ) )
    {
        echo "&lt;li&gt;".$row['description']."&lt;/li&gt;";
    }
    echo "&lt;/ul&gt;&lt;br&gt;&lt;ul&gt;";
    $q = " SELECT * FROM main WHERE id &lt; " . $_GET["id"]. ";";
    $res = mysql_query( $q, $conn);
    while( $row = mysql_fetch_assoc( $res ) )
    {
        // Display the status if it is authorized, otherwise display N/A
        echo "&lt;li&gt;".$row['description']. "(" .
        $authorized ? $row['status'] : "N/A" . ")&lt;/li&gt;";
    }
    echo "&lt;/ul&gt;";
}
magic strings,
DB connection not closed,
DB errors not handled,
no prepared statements with safe query parameters,
injectable request and query parameters,
mix of UI and logic code,
no HTML encoding,
2 of the 3 comments are very redundant with the line they comment.