Hi all, im currently trying to create a news feed, i have the basis of the code, as i can enter information and it is displayed on a different webpage, but i need all of the different updates to be displayed, and need a scroll bar so they can be easily looked through.

<?php
	
	  $connection=mysql_connect('localhost','but09081489','');
$database = mysql_select_db('but09081489',$connection);
// SQL SELECT, ORDER BY , 


$sqlfeed="SELECT * FROM newsfeed WHERE NewsFeedID LIKE '$feed'";
$queryfeed = mysql_query($sqlfeed,$connection);
$updatedfeed = mysql_fetch_assoc($queryfeed);
$feed=$updatedfeed['feed'];
foreach($_post as $feed => $value)
{
echo "$feed = $value<br/>\n";
}
?>

this was how i was trying to do this.

Member Avatar for diafol

$feed is most likely a single item, not an array. You probably need the while loop. Refer to the php.net manual.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.