View Single Post
03-19-2007, 09:30 PM
#5
ali.black is offline ali.black
Status: I'm new around here
Join date: Feb 2007
Location:
Expertise:
Software:
 
Posts: 13
iTrader: 0 / 0%
 

ali.black is on a distinguished road

  Old

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($resultMYSQL_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.