i have a roster on my site which shows all members and the amount of hours they have i want to make it so when their amount of hours go past certain marks the text changes along with the image in teh rank column
heres my code
<h4>Below is a list off all Members</h4>
<body bgcolor="#CCCCCC" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<?php
// Database viewer script for GEA
// (C) Hurst Un-Limited, James Francis Douglas Hurst 2005. All rights reserved.
$server = "localhost";
$username = "*******";
$password ="*******";
$pilot_db = "********";
// Open MySQL connection
$mysql = mysql_connect($server,$username,$password);
mysql_select_db($pilot_db,$mysql);
// Get data from table
$result = mysql_query("SELECT * FROM pilotinfo WHERE visible='1'",$mysql);
while($row = mysql_fetch_array($result)) {
$data[] = $row;
}
// Set up the table, put little bits of HTML after the ? > if you want if you want.
?>
<table border=1 cellpadding=2 cellspacing=0><tr><th width="48">ID</th><th>Name</th><th>Flight Hours</th><th>Rank</th></tr>
<?php
// Begin printing data
for($i=0;$i<count($data);$i++) {
$temp1 = $data[$i]['id'];
$temp2 = $data[$i]['name'];
$temp3 = $data[$i]['hour'];
print("<tr><td>V-RAF $temp1</td><td>$temp2</td><td>$temp3</td><td>Rank</td></tr>");
}
print("</table>");
// Add thats all folks!
?>
im new to php though
i was looking through my book and though about using a loop to do it but couldnt work out how to fit it in so if anyone can help me achive my goal i would greatly appreciate it