Hello,
pls help me with my code...
I was able to output the database table on my page. It goes for example like this:
id | name | etc...
----------------------
01 | john | etc...
02 | mike | etc...
The "ID" is a link (a href).
Once click, it will popup a window with the information of the students.
How can I get a specific row in the database if they were output using while loop like this:
<?php
global $connection;
$query = "SELECT bookingDate, request_id, destination, request_by FROM tbl_tour_request
ORDER BY `tbl_tour_request`.`bookingDate` DESC ";
$result = mysql_query($query);
confirm_query($result);
$num = mysql_num_rows($result);
$i=0;
while ($i < $num) {
$f1=mysql_result($result,$i,"bookingDate");
$f2=mysql_result($result,$i,"request_id");
$f3=mysql_result($result,$i,"destination");
$f4=mysql_result($result,$i,"request_by");
?>
<tr>
<td> <h3><?php echo $f1; ?></h3> </td>
<td> <h3><a href="" ><?php echo $f2; ?></h3></a> </td>
<td> <h3><?php echo $f3; ?></h3> </td>
<td> <h3><?php echo $f4; ?></h3> </td>
</tr>
<?php $i++;} ?>
</table>
Pls help...
Thanks alot!