Say I have displayed a table with "SELECT * FROM details" below
| date | division | start_mile | end_mile | total_mile | Report |
-----------------------------------------------------------------------------
01/02/2011 Division1 25 36 11 Yes
06/03/2011 Division2 365 380 15 Yes
01/02/2011 Division3 67 80 13 No
01/02/2011 Division4 115 135 20 Yes
01/02/2011 Division5 255 275 20 No
01/02/2011 Division6 230 245 15 Yes
I am using this code to output the information into a table
Code: Select all
while($row = sqlsrv_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['date'];
echo "</td><td>";
echo $row['division'];
echo "</td><td>";
echo $row['Start_Mile'];
echo "</td><td>";
echo $row['End_Mile'];
echo "</td><td>";
echo $row['Total_Mile'];
echo "</td><td>";
echo $row ['Report']; //this column clickable
echo "</td></tr>";
}
echo "</table>";When I click on the 'Yes' for example on the fourth row... It will output:
You have chosen to view report for "Division4" from start mile "115" to end mile "135".
Hope this makes sense... Any advice would be much appreciated!
Thanks,
Neil