ok i think im almopst ehre but heres a nerw problem :
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/homer090/public_html/global-european/roster.php on line 19
Access denied for user 'homer090_hill'@'localhost' to database 'Object'
and the code:
<h4>Below is a list off all Members</h4>
Please we aware these figures are in hours and are about 98% accurate until we find a permenate solution to converting the minutes back to hours using php
<body bgcolor="#CCCCCC" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<table border=1 cellpadding=2 cellspacing=0><tr><th width="48">ID</th><th>Name</th><th>Flight Hours (in minutes)</th><th>Rank</th></tr>
<?php
include("configuration.php");
//Roster page database connection
$connict = mysql_connect($mosConfig_host,$mosConfig_user,$mosConfig_password);
$db = mysql_select_db($database,$connict);
// Get data from table
$res = mysql_query("SELECT * FROM pilotinfo WHERE visible='1'",$db) or die(mysql_error());
while ($row = mysql_fetch_array($res))
{
extract($row);
if ($temp3 < 2000)
{
$val = "2000";
$rank = '<img src="http://danhill.frihost.net/easyjetv/images/pilot.jpg"><br><b>Trainee 2nd Officer</b>';
}
elseif ($temp3 < 6000)
{
$val = "6000";
$rank = '<img src="http://danhill.frihost.net/easyjetv/images/second.jpg"><br><b>Second Officer</b>';
}
elseif ($temp3 < 8000)
{
$val = "8000";
$rank = '<img src="http://danhill.frihost.net/easyjetv/images/first.jpg"><br><b>First Officer</b>';
}
elseif ($temp3 < 10000)
{
$val = "10000";
$rank = '<img src="http://danhill.frihost.net/easyjetv/images/capt.jpg"><br><b>Captain</b>';
}
elseif ($temp3 < 12000)
{
$val = "12000";
$rank = '<img src="http://danhill.frihost.net/easyjetv/images/scapt.jpg"><br><b>Senior Captain</b>';
}
elseif ($temp3 = 440887)
{
$val = "440887";
$rank = '<img src="http://danhill.frihost.net/easyjetv/images/scapt.jpg"><br><b>Senior Captain/CEO</b>';
}
$hours2 = "$temp3"/60;
$number = "$hours2";
// english notation without thousands seperator
$hours3 = number_format($number, 1, '.', '');
// 1234.57
echo "<tr><td>EZY- $temp1</td><td>$temp2</td><td>$hours3</td><td>$rank</td>";
print("</table>");
}
// Add thats all folks!
?>
<br><br>
Rank Requirements:<br />
<table cellspacing="1" cellpadding="2" border="2" align="center">
<tr>
<td>Rank</td>
<td>Hours</td>
<td>Image</td>
<br />
</tr>
<tr>
<td>Trainee Second Officer<br />
</td>
<td>0 -> 33.3<br />
</td>
<td><img border="0" src="http://danhill.frihost.net/easyjetv/images/pilot.jpg" /></td>
</tr>
<tr>
<td>Second Officer<br />
</td>
<td>33.4 -> 100<br />
</td>
<td><img border="0" src="http://danhill.frihost.net/easyjetv/images/second.jpg" /></td>
</tr>
<tr>
<td>First Officer<br />
</td>
<td>100.1 -> 133.3<br />
</td>
<td><img border="0" src="http://danhill.frihost.net/easyjetv/images/first.jpg" /></td>
</tr>
<tr>
<td>Captain<br />
</td>
<td>133.4 -> 166.6<br />
</td>
<td><img border="0" src="http://danhill.frihost.net/easyjetv/images/capt.jpg" /></td>
</tr>
<tr>
<td>Senior Catain<br />
</td>
<td>166.7 +<br />
</td>
<td><img border="0" src="http://danhill.frihost.net/easyjetv/images/scapt.jpg" /></td>
</tr>
</table>