[QUOTE=ali.black;320182]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';
}
?>
First off, your PHP is incorrect. The if($result) part merely checks that the MySQL query executed without any problems. It DOES NOT tell you if there are any new rows. You will need to use mysql_num_rows to check for this, for example:
PHP Code:
if (mysql_num_rows($result) > 0) { /* Do something */ }
Secondly, unfortunately I don't really understand your question.....