Hi guys , how is everything ?.
I have got a small problem on the datas which are coming from my database . Ok it is not a real problem .
A part of my website do contain some articles and i want to view only the titles of the articles, that is easy but the problem now i want when someone clicks on the title i want only that article to be loaded in the page articles.php so how can i do that ?

lets say list.php is a page where all article title are shown.

<?
	$q="select * from article";
	$rs = mysql_query($q);
	while($sar = mysql_fetch_assoc($rs))
	{
?>
	<a href="article.php?aid=<? echo $sar['id'];?>"><? echo $sar['title'];?></a>
<?
	}
?>

When user click on that title you can redirect user to article.php with some unique id. and on article.php page you can show article.

<?
	$aid = $_REQUEST['aid'];
	$q="select * from article where id =".$aid;
	$rs = mysql_query($q);
	$sar = mysql_fetch_assoc($rs);	
?>
Title : <? echo $sar['title'];?>
Article : <? echo $sar['article_description'];?>
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.