Ho both and thanks for your replies.
This is the complete page less all the html code.
At the top of the page I display a map of the world which I have split into regions useing
<map name="worldMapMap">
<area shape="poly" coords="198,101,206,92,193,91" href="agents2.php?agent_id=<?php echo $row_agents['agent_id']=13; ?>" alt="INDIA, BANGLADESH, PAKISTAN AND SRI LANKA">
AND SO ON
START OF PAGE
[php require_once('Connections/Chandos.php');[/code]
$queryString_all_records = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_all_records") == false &&
stristr($param, "totalRows_all_records") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_all_records = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_all_records = sprintf("&totalRows_all_records=%d%s", $totalRows_all_records, $queryString_all_records);
?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_agents = 3;
$pageNum_agents = 0;
if (isset($_GET['pageNum_agents'])) {
$pageNum_agents = $_GET['pageNum_agents'];
}
$startRow_agents = $pageNum_agents * $maxRows_agents;
mysql_select_db($database_Chandos, $Chandos);
$query_agents = "SELECT * FROM chandos_agents";
$query_limit_agents = sprintf("%s LIMIT %d, %d", $query_agents, $startRow_agents, $maxRows_agents);
$agents = mysql_query($query_limit_agents, $Chandos) or die(mysql_error());
$row_agents = mysql_fetch_assoc($agents);
if (isset($_GET['totalRows_agents'])) {
$totalRows_agents = $_GET['totalRows_agents'];
} else {
$all_agents = mysql_query($query_agents);
$totalRows_agents = mysql_num_rows($all_agents);
}
$totalPages_agents = ceil($totalRows_agents/$maxRows_agents)-1;
mysql_select_db($database_Chandos, $Chandos);
$query_agents_location = "SELECT * FROM chandos_agents_location ORDER BY agent_location";
$agents_location = mysql_query($query_agents_location, $Chandos) or die(mysql_error());
$row_agents_location = mysql_fetch_assoc($agents_location);
$totalRows_agents_location = mysql_num_rows($agents_location);
$queryString_agents = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_agents") == false &&
stristr($param, "totalRows_agents") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_agents = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_agents = sprintf("&totalRows_agents=%d%s", $totalRows_agents, $queryString_agents);
<map name="worldMapMap">
<area shape="poly" coords="258,114,224,130" href="#">
<area shape="poly" coords="226,139,240,143,255,150,264,152,270,148,271,146,270,145,252,114,236,118,223,126" href="agents2.php?agent_id=3" alt="AUSTRALIA AND NEW ZEALAND">
<area shape="poly" coords="21,118" href="#">
<area shape="poly" coords="159,138,176,97,134,81,124,95,108,76" href="agents2.php?agent_id=1" alt="AFRICA">
<area shape="poly" coords="232,111" href="#">
<area shape="poly" coords="220,103" href="#">
<area shape="poly" coords="221,102" href="#">
<area shape="poly" coords="191,91" href="#">
<area shape="poly" coords="198,101,206,92,193,91" href="agents2.php?agent_id=<?php echo $row_agents['agent_id']=17; ?>" alt="INDIA, BANGLADESH, PAKISTAN AND SRI LANKA">
<area shape="poly" coords="129,72" href="#">
<area shape="poly" coords="157,64,145,69,142,62,149,53,156,63,156,70" href="#" alt="AUSTRIA, BELGIUM, GERMANY, LUXEMBOURG, SWITZERLAND, THE NETHERLANDS">
<area shape="poly" coords="4,28" href="#">
<area shape="poly" coords="4,28,49,31,76,47,84,61,75,78,57,85,42,84,4,48" href="#" alt="USA AND CANADA">
<area shape="poly" coords="137,70" href="#">
<area shape="poly" coords="138,70,137,78,130,79,129,70" href="#" alt="SPAIN AND PORTUGAL">
</map>
In this code I only have one MAP href set which is for displaying the record that has a agent_location of 12.
Does this make sence.