ok... I have changed the code about as requested but the result is still always 1, even though my MySQL query is displaying 2 or more results on the page!
There is quite a bit of code, but here it is. Cast your eyes and if you could help that would be great.
dbconnect();
$sql = "SELECT * FROM $table WHERE received_by = '$fname $sname' ORDER BY date_of_request, time_of_request";
$result = mysql_query($sql);
$num_results = mysql_num_rows($result);
if($num_results != 0)
{
global $auth_name, $auth_email, $auth_phone, $auth_ext;
?>
<!-- Page written by <?php echo $auth_name ?> (<?php echo "$auth_email / Ext No. $auth_ext / DDI No. $auth_phone" ?>) -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>TRAVELBAG: World Travel Specialists - Staff Travel Request</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="http://tbagintranet/includes/intranet.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body onLoad="MM_preloadImages('http://tbagintranet/forms/images/down-reports.gif','http://tbagintranet/forms/images/down-business.gif','http://tbagintranet/forms/images/down-nicki.gif','http://tbagintranet/forms/images/down-clair.gif','http://tbagintranet/forms/images/down-unassrqsts.gif', 'http://tbagintranet/forms/images/down-logout.gif', 'http://tbagintranet/forms/images/down-login.gif')">
<table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFCC33" align="center">
<tr>
<td width="760" height="50" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="760" height="50"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2"><script language="JavaScript">
var j,d="",l="",m="",p="",q="",z="",list= new Array()
list[list.length]='http://tbagintranet/forms/images/header0.jpg';
list[list.length]='http://tbagintranet/forms/images/header1.jpg';
list[list.length]='http://tbagintranet/forms/images/header2.jpg';
list[list.length]='http://tbagintranet/forms/images/header3.jpg';
list[list.length]='http://tbagintranet/forms/images/header4.jpg';
j=parseInt(Math.random()*list.length);
j=(isNaN(j))?0:j;
document.write("<img src='"+list[j]+"'>");
</script></td>
<td><img src="http://tbagintranet/forms/images/worldwide.gif" width="270" height="30"></td>
</tr>
<tr>
<td background="http://tbagintranet/forms/images/spacer2.gif"><div align="center" class="mainheader">Staff Travel Requests</div></td>
</tr>
</table> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="370" align="center" valign="top"> <div align="right" class="vsmall">Logged in
as <?php echo $fname ?> <?php echo $sname ?><br>
</div>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16%"><div align="center" class="tbldata"><a href="msglist.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('unassigned','','../images/down-unassrqsts.gif',1)"><img src="../images/up-unassrqsts.gif" alt="Unassigned requests" name="unassigned" width="132" height="21" border="0"></a></div></td>
<td width="2%"> </td>
<td width="16%"><div align="center" class="tbldata"><img src="../images/down-<?php echo $fname ?>.gif" alt="<?php echo $fname ?>'s queue" width="132" height="21"></div></td>
<td width="2%"> </td>
<td width="16%"><div align="center"><a href="business.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('business','','../images/down-business.gif',1)"><img src="../images/up-business.gif" alt="Business Travel Requests" name="business" width="132" height="21" border="0"></a></div></td>
<td width="2%"><div align="center"></div></td>
<td width="16%"><div align="center"><a href="reports.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('reports','','../images/down-reports.gif',1)"><img src="../images/up-reports.gif" alt="View reports" name="reports" width="132" height="21" border="0"></a></div></td>
<td width="2%"> </td>
<td width="16%"><div align="center"><a href="logout.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('logout','','../images/down-logout.gif',1)"><img src="../images/up-logout.gif" alt="Logout" name="logout" width="132" height="21" border="0"></a></div></td>
</tr>
</table>
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" class="tbldata">There <?php echo $grammar1 ?> currently <?php echo $num_results ?> travel
<?php echo $grammar2 ?> in your queue <?php echo $fname ?>.</td>
<td width="33%" class="tbldata" valign="middle" align="right">Reassign all my calls
to :
<select name="reassign" class="textbox" onChange="MM_jumpMenu('parent',this,0)">
<option value="#" selected>--Select--</option>
<?php
stafftravel_jump();
?>
</select>
</tr>
</table>
<br>
<table width="95%" cellspacing="0" cellpadding="0"border="1" bordercolor="#800000">
<tr class="tbldata">
<td><div align="center"><strong>Request ID</strong></div></td>
<td><div align="center"><strong>Request By</strong></div></td>
<td><div align="center"><strong>Date of Departure</strong></div></td>
<td><div align="center"><strong>Outbound Route</strong></div></td>
<td><div align="center"><strong>Date / Time of Request</strong></div></td>
<td><div align="center"><strong>Locator</strong></div></td>
<td><div align="center"><strong>Last Updated</strong></div></td>
</tr>
<?php
while($request_data = mysql_fetch_array($result))
{
$ID = $request_data['id'];
$StaffName = $request_data['staffname'];
$DateOfDeparture = $request_data['dod'];
$OutboundRoute = $request_data['flight_route1'];
$DateOfRequest = $request_data['date_of_request'];
$TimeOfRequest = $request_data['time_of_request'];
$LastUpdatedDate = $request_data['last_updated_date'];
$Locator = $request_data['locator'];
if (empty($Locator))
{
$Locator = " ";
}
?>
<tr class="tbldata">
<td><div align="center"><a href="viewrequest.php?id=<?php echo $ID ?>" class="tbldata">000<?php echo $ID ?></a></div></td>
<td><div align="center"><?php echo $StaffName ?></div></td>
<td><div align="center"><?php echo $DateOfDeparture ?></div></td>
<td><div align="center"><?php echo $OutboundRoute ?></div></td>
<td><div align="center"><?php echo $DateOfRequest ?> <em>[<?php echo $TimeOfRequest ?>]</em></div></td>
<td><div align="center"><?php echo $Locator ?></div></td>
<td><div align="center"><?php echo $LastUpdatedDate ?></div></td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
<?php
page_footer();
}
else
{
echo "No results";
}