how can I make a link which will display data entries from mysql table? I have a database with a lot of unnecessary data collected. I made a table with 3 columns showing only the Ref. No., Name, Datestamp. I want to add a fourth column which will display a "more details" and when clicked it will open a new page with the other details of that entry. Is this possible?
I am using this code:
$query = "SELECT * FROM `tablename` ORDER BY `Ref` DESC LIMIT 0, 100 ";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
?>
<p align="justify" class="body3px">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<th>Request<br/>ID</th>
<th>Name</th>
<th>Date</th>
</tr>
<?php
$i=0;
while ($i < $num) {
$f1=mysql_result($result,$i,"Ref");
$f2=mysql_result($result,$i,"Name");
$f3=mysql_result($result,$i,"Date");
?>
<tr>
<td><?php echo $f1; ?></td>
<td><?php echo $f2; ?></td>
<td><?php echo $f3; ?></td>
</tr>
<?php
$i++;
} |