0

Hi All,

The title of this thread is the error i am recieving when running the script below.

Im hoping to get it to show all entried from the selected row.

<?php 
$dbh=mysql_connect ("------", "--------", "-----------") or die 
('I cannot connect to the database because: ' . mysql_error()); 
mysql_select_db ("silverlink"); 
$rs = mysql_query("SELECT max(post_id), post_text, post_create_time FROM forum_posts ") or die
(mysql_error());

while ( $rows = mysql_fetch_array( $rs) )
{
echo "<p>";
echo $rows[post_text];
echo "</p>";
}


?>
2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Menster
0

Hi there,
Enclose the phrase post_text in single quotes, like this:

echo $rows['post_text'];

That should sort out your error :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.