here is the php to display the info posted.
PHP Code:
<?php
include ('mysql_connect.php');
$query = "SELECT id, title, author, post, DATE_FORMAT(date, '%M %d, %Y') as sd FROM news_posts";
$result = @mysql_query($query);
if ($result) {
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$url = 'comments.php?id='.$row['id'];
echo '<p><b>'.$row['title'].'</b><br><br>
'<div id="mtext">.$row['post'].</div>'<br><br>
Posted by : <b>'.$row['author'];
}
} else {
echo 'There are no news posts to display';
}
?>
here is the content box div <div class="mtext"> and the header is <div class="mheader">
so basically i want the 'title' to be displayed in the <div class="mheader"> and the 'post' and 'author' to be displayed in the mtext div. but when i click submit on the form i want these .$row['title'] and .$row['post'] to create its own mheader and mtext itself so that i dont have to make these divs on the news page and then put the php code above in the right divs. hope this made better sense.