//	GET THE HIGHEST NUMBER FROM THE ARRAY
        //===================================================
        $lastID = end($posNums);
        //===================================================
        //	INCREMENT THE $lastID VARIABLE
        //===================================================
        $lastID++;
        //===================================================
        //	PUT THE pos BACK AT THE BEGINNING
        //===================================================
        $threadid = 'pos' . $lastID;
        $threadid = "'" . $threadid . "'";
        //===================================================
        //		GET THE SQL AND INSERT INTO TABLE
        //===================================================
        $tableSQL = getPostSQL($secID);
        $tableSQL = $tableSQL . "(" . $threadid . "," . $memID . "," . $posTopic . "," . $posText . "," . $date_today . ")";
        $result = mysql_query($tableSQL);
        mysql_close($db_handle);
        if ($result) {
            print "Your Post has been added to the Forum." . "<BR>";
            print "<A HREF = forumTest.php>Back to the forum</A>" . "<BR>";
        } else {
            print "Already Posted" . "<BR>";
            print "thread id = " . $threadid . " num posts = " . $numRows . "<BR>";
            print $tableSQL;
        }
    }
}
?>
    if (isset($_GET['rID'])) {
        $postID = $_GET['rID'];
        $secCode = $_GET['forum'];
        $pageID = $_GET['pageID'];
    }
}
if ($secCode != '') {
    //================================================================
    //	BUILD UP THE LINK SO THAT A MEMBER CAN REPLY
    //================================================================
    $replyHTML = "?pid=" . $postID . "&sec=" . $secCode;
    $replyHTML = "<A HREF = replyForm.php" . $replyHTML . ">Reply to this post</A>";
    //================================================================
    //	GET THE SQL FOR THE POSTER
    //================================================================
    $posCode = getPostSQL($secCode);
    $posCode = $posCode . "'" . $postID . "'";
    //================================================================
    //	OPEN A CONNECTION TO THE DATABASE
    //================================================================
    $user_name = "root";
    $password = "";
    $database = "dbforum";
    $server = "127.0.0.1";
    $db_handle = mysql_connect($server, $user_name, $password);
    $db_found = mysql_select_db($database, $db_handle);
    if ($db_found) {
        //================================================================
        //	GET THE SQL FOR ALL THE REPLIES
        //================================================================
        $repCode = getReplySQL($secCode);