$textbody = $_POST['textbody'];
$title = $_POST['title'];
$create_article = "CREATE table article (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
headline text,
story_text text,
PRIMARY KEY (id))";
mysql_query($create_article);
$intput = mysql_query("INSERT into article (headline, story_text) values('$title','$textbody')");
$output1 = mysql_query("SELECT headline FROM article ORDER BY id DESC");
$output2 = mysql_query("SELECT story_text FROM article ORDER BY id DESC");
$array = array();
for ($count = 1; (($head = mysql_fetch_array($output1)) and ($text = mysql_fetch_array($output2))); ++$count) {
$array[$count] = $head[0];
printf($array[$count]);
echo "<br />";
echo "<br />";
$array[$count] = $text[0];
printf($array[$count]);
echo "<br />";
echo "<br />";
echo "<br />";
echo "<br />";
echo "<br />";
}
return $array;