I am in a problem that when i click on the heading of the news then it shows the whole news on next page but when i again click on the same or any other heading on that page then it shows an error like undefined index: ‘id’.
Here is my fetching code of heading where i have to click:
<?php
include_once("config.php");
$query2="select * from news";
$rid2=mysql_query($query2);
echo"<table cellspacing='4' cellpadding='3'>";
while($temp=mysql_fetch_array($rid2))
{
echo"<tr>";
;
echo"<td><a href=‘news.php’>“.$temp[‘heading’].”</a></td>";
echo"</tr>";
}
echo"</table>";
?>
And this is the fetching of news when i clicked on heading:
<?php
include_once("config.php");
$i=$_REQUEST['id'];
$m="select * from news where heading='$i'";
$n=mysql_query($m);
while($row=mysql_fetch_array($n)){
echo"<h3>".$row['news']."</h3>";
}
?>
Please suggest me.