title = "i like monkeys"; $vars->menu = array( array("/", "Home"), ); $url_name = $_GET["n"]; if (!isset($url_name)) $url_name = ''; if ($url_name != '') { $query = "SELECT title, copy, date_created, writer, url_name FROM writing WHERE url_name = '" . $url_name . "';"; $vars->title = ucwords(str_replace('_',' ',$url_name)); } else { $query = "SELECT title, copy, date_created, writer, url_name FROM writing WHERE date_created < NOW() ORDER BY date_created DESC LIMIT 1;"; } $result = mysql_query($query); include('../header.php'); ?>
'; while ($row = mysql_fetch_assoc($result)) { echo '

' . $row["title"] . '

'; print('' . $row["writer"] . '

'); print('

' . $row["copy"] . '

'); } print('
'); print('
Contents
'); while ($row = mysql_fetch_assoc($dates)) { echo '' . $row["title"] . '

'; } print('
'); include('../footer.php'); ?>