If you want the page to have a title the same as the subject of the article, then go into the add_article() function and add the following in the <HEAD></HEAD> section of the html output.
(I'm guessing that code is present)
print("<TITLE>".$subject."</TITLE>\n");
Or if you want an alternative title:
function add_article($filename,main_page($title,$subject, $date, $summary, $article_id, $body)) {
// some code here
print("<TITLE>".$title."</TITLE>\n");
// more code here
}
$title = "Your prefered title";
add_article("article_$article_id.html", main_page($title,$subject, $date, $summary, $article_id, $body));