Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/php/
Upload File :
Current File : /var/www/cesa.co.za/php/getoffices.php

x=findObj("OfficeID"); <?php
include( 'inc_db.php' );

$sql="SELECT OfficeID, OfficeStatus, Province, GeoLocation FROM tblMemberFirmOffices WHERE FirmID='".intval($_REQUEST["FirmID"])."' ORDER BY OfficeStatus DESC, Province ASC, GeoLocation ASC";

$recOffices = mysql_query($sql) or die(mysql_error());

$totalRows = mysql_num_rows($recOffices);
echo "x.options.length=".$totalRows."; ";

$i=0;
while ($row_recOffices = mysql_fetch_assoc($recOffices)) {
	echo "x.options[".$i."].value = ".$row_recOffices["OfficeID"]."; ";
	echo "x.options[".$i."].text = '".htmlspecialchars($row_recOffices["OfficeStatus"],ENT_QUOTES).'-'.htmlspecialchars($row_recOffices["Province"],ENT_QUOTES).'-'.htmlspecialchars($row_recOffices["GeoLocation"],ENT_QUOTES)."'; ";

    $i++;
}
mysql_free_result($recOffices);
?>