index.php
<?$dbcnx=mysql_connect('localhost','root',"********" ); mysql_select_db('test',$dbcnx);
$result = @mysql_query('SELECT I,N,A,P,T FROM table1');
while ($row = mysql_fetch_array($result)) { ?>
<table>
<tr>
<td bgcolor=black></td>
<td><a href="content.php?id=<?echo $row['I']?>"><?echo$row['I']?></a></td>
<td bgcolor=black></td>
<td><?echo$row['N']?></td>
<td bgcolor=black></td>
<td><?echo$row['A']?></td>
<td bgcolor=black></td>
<td><?echo$row['P']?></td>
<td bgcolor=black></td>
<td><?echo$row['T']?></td>
<td bgcolor=black></td>
</tr> <?}?>
</table>
The above code works fine now.
If I click the Link, the page moves to content.php smoothly with passing the id.
content.php
<?$dbcnx=mysql_connect('localhost','root',"********" ); mysql_select_db('test',$dbcnx);
$id= intval($_GET["id"]);
if (!$id) {
echo "No ID number specified in the URL";
exit;
} else {
$query = @mysql_query("SELECT * FROM table1 WHERE I = $id" );
}
?>
The content.php has no content. it shows completely empty page.
I think I have to put something like echo "I,N,A,P,T" in order to show the
values.
How can I show the values of the chosen id when a user opens the content.php?