Image

Imagecatfewd wrote in Imagephp

How can you....

Hi.. this is my first post to php community so go a little easy on me (baseball bat do not apply here ;)

At the moment.. in mysql is this:

id, thedate, month, topic, entry in news

I'm trying to do a archive of news which of course is like the following:

database_connect();

$query = "SELECT id, thedate, topic from news order by id desc";
$result = mysql_query($query) or die("id sort out isn't working");

if ($result)
{
while ($r = mysql_fetch_array($result))
{
extract($r);
$entry = nl2br($entry);
echo"- $thedate - $topic";
echo"

";
}
mysql_free_result($result);
}

That should display the thedate and topic (which isn't linked properly yet).....

Now here is the problem.. how can I put in the same script so it can display just ONE news from the database by id?

It is really awkward to explain this but I'm hoping you got some good tips/solution? If someone did something similar to this, I would be interested to take a look at your version.

Thanks!