// Database Connect
include_once "inc/db_connect.inc";
//Article List
$l_sql ='SELECT articleID, headline FROM articles ORDER BY date DESC;';
$l_results = mysql_query($l_sql) or die ('Could not get results articles');
$l_rows = array();
while ($l_row = mysql_fetch_array($l_results))
{
$l_rows[] = $l_row;
}
// Article on Display
if (isset($_REQUEST['aID'])) { $articleID = $_REQUEST['aID']; } else { $articleID = count($l_rows); }
$a_sql ='SELECT headline, article FROM articles WHERE articleID = \''.$articleID.'\';';
$a_results = mysql_query($a_sql) or die ('Could not get results articlesID');
list($headline, $article) = mysql_fetch_row($a_results);
$article = preg_replace("/\n/", "
", $article);
// Set Page Type //
$HEADER = "units/header.html";
$FOOTER = "units/footer.html";
$NAV = "units/nav.html";
include_once($HEADER);
include_once($NAV);
?>
![]() foreach ($l_rows as $a) : ?> if ($a['articleID'] == $articleID ) : ?> = $a['headline'] ?> else : ?> = $a['headline'] ?> endif ?> endforeach ?> |
= $headline ?> by Cari Cole = $article ?> |