i'm trying to display the data from one particular table. everything seem to run fine. but not the data from the table. Please advise, anyone.

Codes is as below:

<?php
	include ("login.php");

	$query = "select * from news";
	$result = mysql_query($query);
	if(!$result)
	{
		die("could not query the database: <br>" .mysql_error());
	}
	echo "<table><tr><td>Date</td><td>Description</td>";
	while($rowsql=mysql_fetch_array($result))
	{
	 	echo "<tr><td>";
		echo " dates";
		echo $result_row["news.dates"]."</td>";
		echo $result_row["news.news_desc"]."</td></tr>";
		echo $result_row["news.news_details"]."</td></tr>";
	}
	mysql_close($connection);
?>

REsult is as below :

Date Description
dates
dates
dates
dates
dates
dates

Try:

echo $result_row["dates"]."</td>";
echo $result_row["news_desc"]."</td></tr>";
echo $result_row["news_details"]."</td></tr>";

Form where $result_row comes from???
i thinks its $rowsql...
i hope so....check it...

the data from the table is still not being displayed.

post your updated code...

thankx so much. problem solved. i can display the text. i tried one more run before posting the updated code and it works. :$

thank you so much....

commented: then.mark this as solved... +2
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.