Jump to content

Recommended Posts

hi,

 

i need help, i got a variables that has an array value and i initially need this when the page loads.

the array variable is $poitype.

 

now i have a button that will submit the poitype value the normal way.

how should i modify this code?

if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype =''; 

to submit values in array and in normal value.

 

this is my the page for reference

http://mango.resonance.com.sg/myoochi/findit/propertyfindit.php?postal=730798&address=

 

if you load the page, there is no error, but when you click on consumer specific R tab and check MRT distance 2km and submit

you will notice that there's an error on the implode syntax.

 

and this is the code for my page

 

<? 
if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype =''; 

?>

                        <table width="417" border="0" cellspacing="0" cellpadding="0">
                          <form action="" method="get">
                            <tr>
                              <td width="168" valign="top"><input name="poitype[]" type="checkbox" value="9CCARE,9FLSCH,9JC,9KG,9PRI,9SEC,9SCARE,9TI" />
                                  <span class="style2">Education for Children</span><br />
                                  <input name="poitype[]" type="checkbox" value="8FBAC,8OSBAC,8RBAC,8ACUMB,9ATM,8FBANK,8OBANK,8RBANK,8DBUMB" />
                                  <span class="style2">Financial Services</span><br />
                                  <input name="poitype[]" type="checkbox" value="9RCLUB" />
                                  <span class="style2">Recreation</span></td>
                              <td width="187" valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" />
                                  <span class="style2">Bus Depot/ Bus Park</span><br />
                                  <input name="poitype[]2" type="checkbox" value="MRT" />
                                  <span class="style2">MRT Station</span><br />
                                  <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" />
                                  <span class="style2">Places of Worship</span></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top" height="6"><img src="images/blank.png" height="6" width="1"></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top">
						  <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2"> KM</span>							  </td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top">
                                </td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top"><input type="submit" name="Submit2" value="Submit" />
                                  <input type="hidden" name="POIview" value="csr" />
                                  <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                                  <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /></td>
                            </tr>
                          </form>
                        </table>


<?
	include 'db_connect.php';

	$input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$code,'x1'=>$long,'y1'=>$lat,'dist'=>$dist);
	$result= $client->getAmenitiesList($input);
	if ($result != null)
	{
		$res = $result->getvicinityReturns;
		$num = count($res);
	}
	else if ($result == null)
	{
		$num = 0;
	}
	$no = 1;

	if ($num > 1)
	{
		foreach ($res as $details)
		{
			$distance=$details->Distance;
			$tradeName=$details->Trade_name;
			$blkNo=$details->blk_no;
			$roadName=$details->Road_name;
			$postalCode=$details->Postal_code;
			$latitude=$details->Latitude;
			$longitude=$details->Longitude;

$uSql = "SELECT * FROM jos_myoochi_properties  WHERE postalcode = '$postalCode' ORDER by property_name ASC";
$uResult = mysql_query($uSql, $connection);
if(!$uResult){
echo 'no data found';
}else{
	while($uRow = mysql_fetch_array($uResult)){
		$propertyName = $uRow["property_name"];
		$address = $uRow["street_name"];
		$noBedroom = $uRow["num_bedrooms"];
		$noBathroom = $uRow["num_bathrooms"];
		$price = $uRow["price_whole"]; 
		$sizesqft = $uRow["property_size"];
		$noCarpark = $uRow["num_carparks"];

			//echo $no++;
echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>
<tr>
<td><img src='test.jpg' width='50' height='50'></td>
<td class='style2' align='left'>
<b>$propertyName</b> $address $noBedroom $noBathroom $price $sizesqft $noCarpark
<br></td>
<td valign='top' align='right'>
<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'>
<img src='images/showmap.gif' alt='show on map'></a>
</td></tr></table>";
}
}
		}

?>

hope you could help me with this.

 

thanks!

Link to comment
https://forums.phpfreaks.com/topic/59250-need-help-on-array-values/
Share on other sites

any help on this please?

 

http://mango.resonance.com.sg/myoochi/findit/propertyfindit.php?postal=730798&address=

 

this is the site.

try to click CSR tab check MRT select 2km distance and Submit

on this result click show on map button

you will get an error on the top,,, telling something about the implode.

 

hope you could help me fix this

thanks!

<?php

$view = isset($_GET['view']) ? $_GET['view'] : $view="init";
$postcode=$_GET['postal'];
$addre=isset($_GET['address']) ? $_GET['address'] :$address="";
$password="v3teletech123";
$username="Trial";
$browser='others';
$sizeW=500; //specifiying the map width
$sizeH=319; //specifiying the map height
$code="9PBCOM";
$x1 = isset($_GET['x1']) ? $_GET['x1'] : $x1="";
$y1 = isset($_GET['y1']) ? $_GET['y1'] : $y1="";
$amenitiesLat = isset($_GET['amenitiesLat']) ? $_GET['amenitiesLat'] : $amenitiesLat="";
$amenitiesLon = isset($_GET['amenitiesLon']) ? $_GET['amenitiesLon'] : $amenitiesLon="";
$keywords=isset($_GET['keywords']) ? $_GET['keywords'] :$keywords="";
$dist = isset($_GET['dist']) ? $_GET['dist'] :$dist="2000";
$POIview = isset($_GET['POIview']) ? $_GET['POIview'] :$POIview="amn";
if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype = ''; 


<table width="323" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="406" align="center"><table width="529" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="top"><table border="1" bordercolor="#000066" width="$sizeW">
          <tr>
            <td colspan="2" align="center" valign="center" width="500" height="319"><img src="<?=$URL?>" /></td>
          </tr>
          <tr>
            <td colspan="2" valign="center"><center class="style3 style5 style6">
                <strong>
                <?=$blockNo?>
                <?=$addres?>
                  , S
                  <?=$postal?>
                </strong>
            </center></td>
          </tr>
          <tr>
            <td colspan="2" align="center" valign="center" bgcolor="#003466"><span class="style1 style4 style1">Map Navigation </span> </td>
          </tr>
          <tr>
            <?php
	 if ($view == "init" || $view == "up" || $view == "down" || $view == "left" || $view == "right" || $view == "in" || $view == "out")
	              	{
            ?>
            <td width="152" align="center" valign="center" bgcolor="#003466">

		<a href="propertyfindit.php?postal=<?=$postcode?>&view=init&address=<?=$addre?>&browser=<?=$browser?>" ><img src="images/reset.gif" height="28" border="0" /></a>
		<a href="propertyfindit.php?postal=<?=$postcode?>&view=in&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/plus.gif" width="28" height="28" border="0" alt="Zoom In" /></a>
		<a href="propertyfindit.php?postal=<?=$postcode?>&view=out&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/minus.gif" alt="Zoom Out" width="28" height="28" border="0" /></a> </td>

            <td width="159" align="center" valign="center" bgcolor="#003466">
		<a href="propertyfindit.php?postal=<?=$postcode?>&view=up&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/up.gif" alt="Move Up" width="28" height="28" border="0" /></a>
		 <a href="propertyfindit.php?postal=<?=$postcode?>&view=down&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/down.gif" alt="Move Down" width="28" height="28" border="0" /></a>
		 <a href="propertyfindit.php?postal=<?=$postcode?>&view=left&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/left.gif" alt="Move Left" width="28" height="28" border="0" /></a>
		 <a href="propertyfindit.php?postal=<?=$postcode?>&view=right&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/right.gif" alt="Move Right" width="28" height="28" border="0" /></a> </td>
		 <?php
		 }
 else if ($view == "amnview" || $view == "amnup" || $view == "amndown" || $view == "amnleft" || $view == "amnright" || $view == "amnin" || $view == "amnout")
		 {

		 ?>
		 <td width="152" align="center" valign="center" bgcolor="#003466">

	<a href="propertyfindit.php?postal=<?=$postcode?>&view=amnview&y1=&x1=&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>" ><img src="images/reset.gif" height="28" border="0" /></a>


		<a href="propertyfindit.php?postal=<?=$postcode?>&view=amnin&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/plus.gif" width="28" height="28" border="0" alt="Zoom In" /></a>
		<a href="propertyfindit.php?postal=<?=$postcode?>&view=amnout&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/minus.gif" alt="Zoom Out" width="28" height="28" border="0" /></a> </td>

		<td width="159" align="center" valign="center" bgcolor="#003466">
		<a href="propertyfindit.php?postal=<?=$postcode?>&view=amnup&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/up.gif" alt="Move Up" width="28" height="28" border="0" /></a>
		 <a href="propertyfindit.php?postal=<?=$postcode?>&view=amndown&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/down.gif" alt="Move Down" width="28" height="28" border="0" /></a>
		 <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnleft&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/left.gif" alt="Move Left" width="28" height="28" border="0" /></a>
		 <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnright&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/right.gif" alt="Move Right" width="28" height="28" border="0" /></a> </td>

		 <?php
		 }
		 ?>

          </tr>
          <tr>
            <td colspan="2" valign="center" bgcolor="#003466"></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td align="center" valign="top"> </td>
      </tr>
      <tr>
        <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="108" align="left"><table width="108" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:none; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#0d7a73" id="LINK1">
                <tr>
                  <td width="106" align="center" class="style1"><a href="javascript:;" onclick="changeStyle1(); javascript:riseup('box11')" id="tab11"><font style="color:#ffffff; font-size:12px" id="LINK1a">Top Property</font></a> </td>
                </tr>
            </table></td>
            <td width="4" align="left"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px">
                <tr>
                  <td width="10"> </td>
                </tr>
            </table></td>
            <td width="159" align="left"><table width="159" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK2">
                <tr>
                  <td width="157" align="center"><a href="javascript:;" onclick="changeStyle2(); javascript:riseup('box12')" id="tab12"><span class="style1" id="LINK2a">Consumer Specific R</span></a></td>
                </tr>
            </table></td>
            <td width="4" align="left"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px">
                <tr>
                  <td width="10"> </td>
                </tr>
            </table></td>
            <td width="119" align="left"><table width="119" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK3">
                <tr>
                  <td width="117" align="center"><a href="javascript:;" onclick="changeStyle3(); javascript:riseup('box13')" id="tab13"><span class="style1" id="LINK3a">Point of Interest </span></a></td>
                </tr>
            </table></td>
            <td width="4"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px">
                <tr>
                  <td width="5"> </td>
                </tr>
            </table></td>
            <td width="114"><table width="114" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK4">
              <tr>
                <td width="112" align="center"><a href="javascript:;" onclick="changeStyle4(); javascript:riseup('box14')" id="tab14"><span class="style1" id="LINK4a">Street Directory </span></a></td>
              </tr>
            </table></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px">
              <tr>
                <td width="5"> </td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td colspan="8"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid">
                <tr>
                  <td height="169" align="center" valign="top" bgcolor="#D1EAE7"><div id="box1" style="visibility:visible; background-color:#D1EAE7; position:absolute; left: 435px; top: 513px; width: 370px;">
                      <table width="353" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td> </td>
                        </tr>
                        <tr>
                          <td height="25" align="center"><form action="" method="get">
                              <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2">KM</span>
                              <input type="submit" name="Submit" value="Submit" />
                              <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                              <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" />
                              <input type="hidden" name="POIview" value="amn" />
                          </form></td>
                        </tr>
                        <tr>
                          <td> </td>
                        </tr>
                      </table>
                  </div>
                      <div id="box2" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 383px; top: 506px; width: 402px;">
                        <table width="417" border="0" cellspacing="0" cellpadding="0">
                          <form action="" method="get">
                            <tr>
                              <td width="168" valign="top"><input name="poitype[]" type="checkbox" value="9CCARE,9FLSCH,9JC,9KG,9PRI,9SEC,9SCARE,9TI" />
                                  <span class="style2">Education for Children</span><br />
                                  <input name="poitype[]" type="checkbox" value="8FBAC,8OSBAC,8RBAC,8ACUMB,9ATM,8FBANK,8OBANK,8RBANK,8DBUMB" />
                                  <span class="style2">Financial Services</span><br />
                                  <input name="poitype[]" type="checkbox" value="9RCLUB" />
                                  <span class="style2">Recreation</span></td>
                              <td width="187" valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" />
                                  <span class="style2">Bus Depot/ Bus Park</span><br />
                                  <input name="poitype[]2" type="checkbox" value="MRT" />
                                  <span class="style2">MRT Station</span><br />
                                  <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" />
                                  <span class="style2">Places of Worship</span></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top" height="6"><img src="images/blank.png" height="6" width="1"></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top">
						  <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2"> KM</span>							  </td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top">
                                </td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top"><input type="submit" name="Submit2" value="Submit" />
                                  <input type="hidden" name="POIview" value="csr" />
                                  <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                                  <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /></td>
                            </tr>
                          </form>
                        </table>
                      </div>
                    <div id="box3" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 367px; top: 489px; width: 443px;">
                        <table width="417" border="0" cellspacing="0" cellpadding="0">
                          <form action="" method="get">
                            <tr>
                              <td valign="top"><input name="poitype[]" type="checkbox" value="9SCTRE" />
                                  <span class="style2">Shopping Centre</span><br />
                                  <input name="poitype[]" type="checkbox" value="9SMKT" />
                                  <span class="style2">Supermarket</span><br />
                                  <input name="poitype[]" type="checkbox" value="8CC" />
                                  <span class="style2">Community Centre/ Clubs</span><br />
                                  <input name="poitype[]" type="checkbox" value="9SWC" />
                                  <span class="style2">Swimming Complex</span><br />
                                  <input name="poitype[]" type="checkbox" value="9HOSP" />
                                  <span class="style2">Hospitals & Medical Centre</span></td>
                              <td valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" />
                                  <span class="style2">Bus Depot/ Bus Park</span><br />
                                  <input name="poitype[]" type="checkbox" value="9HEC" />
                                  <span class="style2">High Commission/Embassy/Consulate</span><br />
                                  <input name="poitype[]" type="checkbox" value="MRT" />
                                  <span class="style2">MRT Station</span><br />
                                  <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" />
                                  <span class="style2">Places of Worship</span></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top" height="6"><img src="images/blank.png" width="1" height="6"></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top">
						 <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2"> KM</span>
						  </td>
                            </tr>
                            <tr>
                              <td colspan="2"><input type="submit" name="Submit3" value="Submit" />
                                <input type="hidden"  name="POIview" value="csr" />
                                  <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                                  <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" />
                              </td>
                            </tr>
                          </form>
                        </table>
                    </div>
<div id="box4" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 386px; top: 514px; width: 482px;">
                      <table width="476" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="410"> </td>
                        </tr>
                        <tr>
                          <td align="center"><form action="" method="get">
                              <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2">KM</span>
                               
                              <input type="text" name="keywords">
                              <span class="style2">Keywords</span>
                              <input type="submit" name="Submit" value="Submit" />
                              <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                              <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" />
                              <input type="hidden" name="POIview" value="amnall" />
                          </form></td>
                        </tr>
                        <tr>
                          <td> </td>
                        </tr>
                      </table>
                  </div>
				</td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table>
          <tr>
            <td width="529" align="center">               </td>
          </tr>
          <tr>
            <td align="center" class="style2">Current Distance Radius = <? echo "$dist"; ?> Meters<br>
		<? print_r($amenitiesLat) ?><br>
		<? print_r($amenitiesLon) ?><br>
		<? print_r($poitype) ?></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#003466"> </td>
          </tr>
          <tr>
            <td>

		<!-- for the display of results -->
              <?php
//for the search by distance
	if ($POIview =="amn") {
	include 'db_connect.php';

	$input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$code,'x1'=>$long,'y1'=>$lat,'dist'=>$dist);
	$result= $client->getAmenitiesList($input);
	if ($result != null)
	{
		$res = $result->getvicinityReturns;
		$num = count($res);
	}
	else if ($result == null)
	{
		$num = 0;
	}
	$no = 1;

	if ($num > 1)
	{
		foreach ($res as $details)
		{
			$distance=$details->Distance;
			$tradeName=$details->Trade_name;
			$blkNo=$details->blk_no;
			$roadName=$details->Road_name;
			$postalCode=$details->Postal_code;
			$latitude=$details->Latitude;
			$longitude=$details->Longitude;

$uSql = "SELECT * FROM jos_myoochi_properties  WHERE postalcode = '$postalCode' ORDER by property_name ASC";
$uResult = mysql_query($uSql, $connection);
if(!$uResult){
echo 'no data found';
}else{
	while($uRow = mysql_fetch_array($uResult)){
		$propertyName = $uRow["property_name"];
		$address = $uRow["street_name"];
		$noBedroom = $uRow["num_bedrooms"];
		$noBathroom = $uRow["num_bathrooms"];
		$price = $uRow["price_whole"]; 
		$sizesqft = $uRow["property_size"];
		$noCarpark = $uRow["num_carparks"];

			//echo $no++;
echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>
<tr>
<td><img src='test.jpg' width='50' height='50'></td>
<td class='style2' align='left'>
<b>$propertyName</b> $address $noBedroom $noBathroom $price $sizesqft $noCarpark
<br></td>
<td valign='top' align='right'>
<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'>
<img src='images/showmap.gif' alt='show on map'></a>
</td></tr></table>";
}
}
		}
	}
	else if ($num == 1)
	{
		$distance=$res->Distance;
		$tradeName=$res->Trade_name;
		$blkNo=$res->blk_no;
		$roadName=$res->Road_name;
		$postalCode=$res->Postal_code;
		$latitude=$res->Latitude;
		$longitude=$res->Longitude;

$uSql = "SELECT * FROM jos_myoochi_properties  WHERE postalcode = '$postalCode' ORDER by property_name ASC";
$uResult = mysql_query($uSql, $connection);
if(!$uResult){
echo 'no data found';
}else{
	while($uRow = mysql_fetch_array($uResult)){
		$propertyName = $uRow["property_name"];
		$address = $uRow["street_name"];
		$noBedroom = $uRow["num_bedrooms"];
		$noBathroom = $uRow["num_bathrooms"];
		$price = $uRow["price_whole"]; 
		$sizesqft = $uRow["property_size"];
		$noCarpark = $uRow["num_carparks"];

		//echo $no++;
echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>
<tr>
<td><img src='test.jpg' width='50' height='50'></td>
<td class='style2' align='left'>
<b>$propertyName</b> $address $noBedroom $noBathroom $price $sizesqft $noCarpark
<br></td>
<td valign='top' align='right'>
<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'></a>
</td></tr></table>";
}
}
	}
	else if ($num == 0)
	{
		echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>";
	}
}
//for the search csr and poi
else if ($POIview=="csr")
{
	$input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$poitype,'x1'=>$long,'y1'=>$lat,'dist'=>$dist);
	$result= $client->getAmenitiesList($input);
	if ($result != null)
	{
		$res = $result->getvicinityReturns;
		$num = count($res);
	}
	else if ($result == null)
	{
		$num = 0;
	}

	$no = 1;
	if ($num > 1)
	{
		foreach ($res as $details)
		{

			$distance=$details->Distance;
			$latitude=$details->Latitude;
			$longitude=$details->Longitude;

			$postalcode=$details->Postal_code;
			$blockNo=$details->blk_no;
			$road=$details->Road_name;
			$place=$details->Trade_name;
//echo $no++;
echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>
<tr>
<td class='style2' align='left'>
<b>$place</b><br>$blockNo $road, Singapore $postalcode
<br></td>
<td valign='top' align='right'>
<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale&POIview=csr&poitype=$poitype&dist=$dist'><img src='images/showmap.gif' alt='show on map'></a>
</td></tr></table>";
		}
	}

	if ($num == 1)
	{
			$distance=$res->Distance;
			$latitude=$res->Latitude;
			$longitude=$res->Longitude;

			$postalcode=$res->Postal_code;
			$blockNo=$res->blk_no;
			$road=$res->Road_name;
			$place=$res->Trade_name;

		echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>
<tr>
<td class='style2' align='left'>
<b>$place</b><br>$blockNo $road, Singapore $postalcode
<br></td>
<td valign='top' align='right'>
<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale&POIview=csr&poitype=$poitype&dist=$dist'><img src='images/showmap.gif' alt='show on map'></a>
</td></tr></table>";
	}
	if ($num == 0)
	{
		echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>";

	}
}
//for the search amenities all
else if ($POIview=="amnall")
{
	$AmenitiesSearch=array('username'=>$username,'password'=>$password,'input'=>$keywords,'x1'=>$long,'y1'=>$lat,'dist'=>$dist);
$result= $client->getAmenitiesSearchList($AmenitiesSearch);
	if ($result != null)
	{
	$res = $result->getvicinityAllReturns;
	$num=count($res);
	}
	else if ($result == null)
	{
		$num = 0;
	}

	$no = 1;
	if ($num > 1)
	{
		foreach ($res as $details)
	{
		$distance=$details->Distance;
		$latitude=$details->Latitude;
		$longitude=$details->Longitude;
		$postal=$details->Postal_code;
		$blockNo=$details->blk_no;
		$road=$details->Road_name;
		$place=$details->Trade_name;

//echo $no++;
echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>
<tr>
<td class='style2' align='left'>
<b>$place</b><br>$blockNo $road, Singapore $postal
<br></td>
<td valign='top' align='right'>
<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'></a>
</td></tr></table>";
		}
	}

	if ($num == 1)
	{
	$distance=$res->Distance;
	$latitude=$res->Latitude;
	$longitude=$res->Longitude;
	$postal=$res->Postal_code;
	$blockNo=$res->blk_no;
	$road=$res->Road_name;
	$place=$res->Trade_name;

		echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>
<tr>
<td class='style2' align='left'>
<b>$place</b><br>$blockNo $road, Singapore $postal
<br></td>
<td valign='top' align='right'>
<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'></a>
</td></tr></table>";
	}
	if ($num == 0)
	{
		echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>";

	}
}
//end
}

}
catch (SoapFault $exception)
{
echo $exception;
}
?>

        </table></td>
      </tr>
    </table>

 

MOD EDIT - Code tags !!!

sorry, i thought i already inserted this inside the code tag

below is my code for the entire page

 

<?php

$view = isset($_GET['view']) ? $_GET['view'] : $view="init";
$postcode=$_GET['postal'];
$addre=isset($_GET['address']) ? $_GET['address'] :$address="";
$password="v3teletech123";
$username="Trial";
$browser='others';
$sizeW=500; //specifiying the map width
$sizeH=319; //specifiying the map height
$code="9PBCOM";
$x1 = isset($_GET['x1']) ? $_GET['x1'] : $x1="";
$y1 = isset($_GET['y1']) ? $_GET['y1'] : $y1="";
$amenitiesLat = isset($_GET['amenitiesLat']) ? $_GET['amenitiesLat'] : $amenitiesLat="";
$amenitiesLon = isset($_GET['amenitiesLon']) ? $_GET['amenitiesLon'] : $amenitiesLon="";
$keywords=isset($_GET['keywords']) ? $_GET['keywords'] :$keywords="";
$dist = isset($_GET['dist']) ? $_GET['dist'] :$dist="2000";
$POIview = isset($_GET['POIview']) ? $_GET['POIview'] :$POIview="amn";
if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype = ''; 


   <table width="323" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="406" align="center"><table width="529" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="top"><table border="1" bordercolor="#000066" width="$sizeW">
          <tr>
            <td colspan="2" align="center" valign="center" width="500" height="319"><img src="<?=$URL?>" /></td>
          </tr>
          <tr>
            <td colspan="2" valign="center"><center class="style3 style5 style6">
                <strong>
                <?=$blockNo?>
                <?=$addres?>
                  , S
                  <?=$postal?>
                </strong>
            </center></td>
          </tr>
          <tr>
            <td colspan="2" align="center" valign="center" bgcolor="#003466"><span class="style1 style4 style1">Map Navigation </span> </td>
          </tr>
          <tr>
            <?php
       if ($view == "init" || $view == "up" || $view == "down" || $view == "left" || $view == "right" || $view == "in" || $view == "out")
                       {
            ?>
            <td width="152" align="center" valign="center" bgcolor="#003466">

         <a href="propertyfindit.php?postal=<?=$postcode?>&view=init&address=<?=$addre?>&browser=<?=$browser?>" ><img src="images/reset.gif" height="28" border="0" />[/url]
         <a href="propertyfindit.php?postal=<?=$postcode?>&view=in&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/plus.gif" width="28" height="28" border="0" alt="Zoom In" />[/url]
         <a href="propertyfindit.php?postal=<?=$postcode?>&view=out&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/minus.gif" alt="Zoom Out" width="28" height="28" border="0" />[/url] </td>

            <td width="159" align="center" valign="center" bgcolor="#003466">
         <a href="propertyfindit.php?postal=<?=$postcode?>&view=up&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/up.gif" alt="Move Up" width="28" height="28" border="0" />[/url]
          <a href="propertyfindit.php?postal=<?=$postcode?>&view=down&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/down.gif" alt="Move Down" width="28" height="28" border="0" />[/url]
          <a href="propertyfindit.php?postal=<?=$postcode?>&view=left&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/left.gif" alt="Move Left" width="28" height="28" border="0" />[/url]
          <a href="propertyfindit.php?postal=<?=$postcode?>&view=right&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/right.gif" alt="Move Right" width="28" height="28" border="0" />[/url] </td>
          <?php
          }
    else if ($view == "amnview" || $view == "amnup" || $view == "amndown" || $view == "amnleft" || $view == "amnright" || $view == "amnin" || $view == "amnout")
          {
          
          ?>
          <td width="152" align="center" valign="center" bgcolor="#003466">

      <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnview&y1=&x1=&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>" ><img src="images/reset.gif" height="28" border="0" />[/url]


         <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnin&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/plus.gif" width="28" height="28" border="0" alt="Zoom In" />[/url]
         <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnout&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/minus.gif" alt="Zoom Out" width="28" height="28" border="0" />[/url] </td>

         <td width="159" align="center" valign="center" bgcolor="#003466">
         <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnup&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/up.gif" alt="Move Up" width="28" height="28" border="0" />[/url]
          <a href="propertyfindit.php?postal=<?=$postcode?>&view=amndown&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/down.gif" alt="Move Down" width="28" height="28" border="0" />[/url]
          <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnleft&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/left.gif" alt="Move Left" width="28" height="28" border="0" />[/url]
          <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnright&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/right.gif" alt="Move Right" width="28" height="28" border="0" />[/url] </td>

          <?php
          }
          ?>

          </tr>
          <tr>
            <td colspan="2" valign="center" bgcolor="#003466"></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td align="center" valign="top"> </td>
      </tr>
      <tr>
        <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="108" align="left"><table width="108" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:none; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#0d7a73" id="LINK1">
                <tr>
                  <td width="106" align="center" class="style1"><a href="javascript:;" onclick="changeStyle1(); javascript:riseup('box11')" id="tab11"><font style="color:#ffffff; font-size:12px" id="LINK1a">Top Property</font>[/url] </td>
                </tr>
            </table></td>
            <td width="4" align="left"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px">
                <tr>
                  <td width="10"> </td>
                </tr>
            </table></td>
            <td width="159" align="left"><table width="159" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK2">
                <tr>
                  <td width="157" align="center"><a href="javascript:;" onclick="changeStyle2(); javascript:riseup('box12')" id="tab12"><span class="style1" id="LINK2a">Consumer Specific R</span>[/url]</td>
                </tr>
            </table></td>
            <td width="4" align="left"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px">
                <tr>
                  <td width="10"> </td>
                </tr>
            </table></td>
            <td width="119" align="left"><table width="119" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK3">
                <tr>
                  <td width="117" align="center"><a href="javascript:;" onclick="changeStyle3(); javascript:riseup('box13')" id="tab13"><span class="style1" id="LINK3a">Point of Interest </span>[/url]</td>
                </tr>
            </table></td>
            <td width="4"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px">
                <tr>
                  <td width="5"> </td>
                </tr>
            </table></td>
            <td width="114"><table width="114" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK4">
              <tr>
                <td width="112" align="center"><a href="javascript:;" onclick="changeStyle4(); javascript:riseup('box14')" id="tab14"><span class="style1" id="LINK4a">Street Directory </span>[/url]</td>
              </tr>
            </table></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px">
              <tr>
                <td width="5"> </td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td colspan="8"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid">
                <tr>
                  <td height="169" align="center" valign="top" bgcolor="#D1EAE7"><div id="box1" style="visibility:visible; background-color:#D1EAE7; position:absolute; left: 435px; top: 513px; width: 370px;">
                      <table width="353" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td> </td>
                        </tr>
                        <tr>
                          <td height="25" align="center"><form action="" method="get">
                              <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2">KM</span>
                              <input type="submit" name="Submit" value="Submit" />
                              <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                              <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" />
                              <input type="hidden" name="POIview" value="amn" />
                          </form></td>
                        </tr>
                        <tr>
                          <td> </td>
                        </tr>
                      </table>
                  </div>
                      <div id="box2" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 383px; top: 506px; width: 402px;">
                        <table width="417" border="0" cellspacing="0" cellpadding="0">
                          <form action="" method="get">
                            <tr>
                              <td width="168" valign="top"><input name="poitype[]" type="checkbox" value="9CCARE,9FLSCH,9JC,9KG,9PRI,9SEC,9SCARE,9TI" />
                                  <span class="style2">Education for Children</span>

                                  <input name="poitype[]" type="checkbox" value="8FBAC,8OSBAC,8RBAC,8ACUMB,9ATM,8FBANK,8OBANK,8RBANK,8DBUMB" />
                                  <span class="style2">Financial Services</span>

                                  <input name="poitype[]" type="checkbox" value="9RCLUB" />
                                  <span class="style2">Recreation</span></td>
                              <td width="187" valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" />
                                  <span class="style2">Bus Depot/ Bus Park</span>

                                  <input name="poitype[]2" type="checkbox" value="MRT" />
                                  <span class="style2">MRT Station</span>

                                  <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" />
                                  <span class="style2">Places of Worship</span></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top" height="6"><img src="images/blank.png" height="6" width="1"></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top">
                       <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2"> KM</span>                       </td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top">
                                </td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top"><input type="submit" name="Submit2" value="Submit" />
                                  <input type="hidden" name="POIview" value="csr" />
                                  <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                                  <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /></td>
                            </tr>
                          </form>
                        </table>
                      </div>
                    <div id="box3" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 367px; top: 489px; width: 443px;">
                        <table width="417" border="0" cellspacing="0" cellpadding="0">
                          <form action="" method="get">
                            <tr>
                              <td valign="top"><input name="poitype[]" type="checkbox" value="9SCTRE" />
                                  <span class="style2">Shopping Centre</span>

                                  <input name="poitype[]" type="checkbox" value="9SMKT" />
                                  <span class="style2">Supermarket</span>

                                  <input name="poitype[]" type="checkbox" value="8CC" />
                                  <span class="style2">Community Centre/ Clubs</span>

                                  <input name="poitype[]" type="checkbox" value="9SWC" />
                                  <span class="style2">Swimming Complex</span>

                                  <input name="poitype[]" type="checkbox" value="9HOSP" />
                                  <span class="style2">Hospitals & Medical Centre</span></td>
                              <td valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" />
                                  <span class="style2">Bus Depot/ Bus Park</span>

                                  <input name="poitype[]" type="checkbox" value="9HEC" />
                                  <span class="style2">High Commission/Embassy/Consulate</span>

                                  <input name="poitype[]" type="checkbox" value="MRT" />
                                  <span class="style2">MRT Station</span>

                                  <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" />
                                  <span class="style2">Places of Worship</span></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top" height="6"><img src="images/blank.png" width="1" height="6"></td>
                            </tr>
                            <tr>
                              <td colspan="2" valign="top">
                      <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2"> KM</span>
                       </td>
                            </tr>
                            <tr>
                              <td colspan="2"><input type="submit" name="Submit3" value="Submit" />
                                <input type="hidden"  name="POIview" value="csr" />
                                  <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                                  <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" />
                              </td>
                            </tr>
                          </form>
                        </table>
                    </div>
<div id="box4" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 386px; top: 514px; width: 482px;">
                      <table width="476" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="410"> </td>
                        </tr>
                        <tr>
                          <td align="center"><form action="" method="get">
                              <span class="style5 style2">Distance from Property</span>
                              <select name="dist" class="style5">
                                <option value="1000">1</option>
                                <option value="2000">2</option>
                                <option value="3000">3</option>
                                <option value="4000">4</option>
                                <option value="5000">5</option>
                                <option value="6000">6</option>
                                <option value="7000">7</option>
                                <option value="8000">8</option>
                                <option value="9000">9</option>
                                <option value="10000">10</option>
                              </select>
                              <span class="style2">KM</span>
                               
                              <input type="text" name="keywords">
                              <span class="style2">Keywords</span>
                              <input type="submit" name="Submit" value="Submit" />
                              <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" />
                              <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" />
                              <input type="hidden" name="POIview" value="amnall" />
                          </form></td>
                        </tr>
                        <tr>
                          <td> </td>
                        </tr>
                      </table>
                  </div>
               </td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table>
          <tr>
            <td width="529" align="center">               </td>
          </tr>
          <tr>
            <td align="center" class="style2">Current Distance Radius = <? echo "$dist"; ?> Meters

         <? print_r($amenitiesLat) ?>

         <? print_r($amenitiesLon) ?>

         <? print_r($poitype) ?></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#003466"> </td>
          </tr>
          <tr>
            <td>

 

        <!-- for the display of results -->

              <?php

//for the search by distance

      if ($POIview =="amn") {

      include 'db_connect.php';

     

      $input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$code,'x1'=>$long,'y1'=>$lat,'dist'=>$dist);

      $result= $client->getAmenitiesList($input);

      if ($result != null)

      {

        $res = $result->getvicinityReturns;

        $num = count($res);

      }

      else if ($result == null)

      {

        $num = 0;

      }

      $no = 1;

 

      if ($num > 1)

      {

        foreach ($res as $details)

        {

            $distance=$details->Distance;

            $tradeName=$details->Trade_name;

            $blkNo=$details->blk_no;

            $roadName=$details->Road_name;

            $postalCode=$details->Postal_code;

            $latitude=$details->Latitude;

            $longitude=$details->Longitude;

           

  $uSql = "SELECT * FROM jos_myoochi_properties  WHERE postalcode = '$postalCode' ORDER by property_name ASC";

  $uResult = mysql_query($uSql, $connection);

  if(!$uResult){

  echo 'no data found';

  }else{

      while($uRow = mysql_fetch_array($uResult)){

        $propertyName = $uRow["property_name"];

        $address = $uRow["street_name"];

        $noBedroom = $uRow["num_bedrooms"];

        $noBathroom = $uRow["num_bathrooms"];

        $price = $uRow["price_whole"];

        $sizesqft = $uRow["property_size"];

        $noCarpark = $uRow["num_carparks"];

       

            //echo $no++;

echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>

<tr>

<td><img src='test.jpg' width='50' height='50'></td>

<td class='style2' align='left'>

$propertyName $address $noBedroom $noBathroom $price $sizesqft $noCarpark

 

</td>

<td valign='top' align='right'>

<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'>

<img src='images/showmap.gif' alt='show on map'>[/url]

</td></tr></table>";

}

}

        }

      }

      else if ($num == 1)

      {

        $distance=$res->Distance;

        $tradeName=$res->Trade_name;

        $blkNo=$res->blk_no;

        $roadName=$res->Road_name;

        $postalCode=$res->Postal_code;

        $latitude=$res->Latitude;

        $longitude=$res->Longitude;

       

  $uSql = "SELECT * FROM jos_myoochi_properties  WHERE postalcode = '$postalCode' ORDER by property_name ASC";

  $uResult = mysql_query($uSql, $connection);

  if(!$uResult){

  echo 'no data found';

  }else{

      while($uRow = mysql_fetch_array($uResult)){

        $propertyName = $uRow["property_name"];

        $address = $uRow["street_name"];

        $noBedroom = $uRow["num_bedrooms"];

        $noBathroom = $uRow["num_bathrooms"];

        $price = $uRow["price_whole"];

        $sizesqft = $uRow["property_size"];

        $noCarpark = $uRow["num_carparks"];

       

        //echo $no++;

echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>

<tr>

<td><img src='test.jpg' width='50' height='50'></td>

<td class='style2' align='left'>

$propertyName $address $noBedroom $noBathroom $price $sizesqft $noCarpark

 

</td>

<td valign='top' align='right'>

<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'>[/url]

</td></tr></table>";

}

}

      }

      else if ($num == 0)

      {

        echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>";

      }

  }

  //for the search csr and poi

  else if ($POIview=="csr")

  {

      $input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$poitype,'x1'=>$long,'y1'=>$lat,'dist'=>$dist);

      $result= $client->getAmenitiesList($input);

      if ($result != null)

      {

        $res = $result->getvicinityReturns;

        $num = count($res);

      }

      else if ($result == null)

      {

        $num = 0;

      }

 

      $no = 1;

      if ($num > 1)

      {

        foreach ($res as $details)

        {

 

            $distance=$details->Distance;

            $latitude=$details->Latitude;

            $longitude=$details->Longitude;

 

            $postalcode=$details->Postal_code;

            $blockNo=$details->blk_no;

            $road=$details->Road_name;

            $place=$details->Trade_name;

//echo $no++;

echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>

<tr>

<td class='style2' align='left'>

$place

$blockNo $road, Singapore $postalcode

 

</td>

<td valign='top' align='right'>

<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale&POIview=csr&poitype=$poitype&dist=$dist'><img src='images/showmap.gif' alt='show on map'>[/url]

</td></tr></table>";

        }

      }

 

      if ($num == 1)

      {

            $distance=$res->Distance;

            $latitude=$res->Latitude;

            $longitude=$res->Longitude;

 

            $postalcode=$res->Postal_code;

            $blockNo=$res->blk_no;

            $road=$res->Road_name;

            $place=$res->Trade_name;

 

        echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>

<tr>

<td class='style2' align='left'>

$place

$blockNo $road, Singapore $postalcode

 

</td>

<td valign='top' align='right'>

<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale&POIview=csr&poitype=$poitype&dist=$dist'><img src='images/showmap.gif' alt='show on map'>[/url]

</td></tr></table>";

      }

      if ($num == 0)

      {

        echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>";

 

      }

  }

  //for the search amenities all

  else if ($POIview=="amnall")

  {

      $AmenitiesSearch=array('username'=>$username,'password'=>$password,'input'=>$keywords,'x1'=>$long,'y1'=>$lat,'dist'=>$dist);

  $result= $client->getAmenitiesSearchList($AmenitiesSearch);

      if ($result != null)

      {

      $res = $result->getvicinityAllReturns;

      $num=count($res);

      }

      else if ($result == null)

      {

        $num = 0;

      }

 

      $no = 1;

      if ($num > 1)

      {

        foreach ($res as $details)

      {

        $distance=$details->Distance;

        $latitude=$details->Latitude;

        $longitude=$details->Longitude;

        $postal=$details->Postal_code;

        $blockNo=$details->blk_no;

        $road=$details->Road_name;

        $place=$details->Trade_name;

 

//echo $no++;

echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'>

<tr>

<td class='style2' align='left'>

$place

$blockNo $road, Singapore $postal

 

</td>

<td valign='top' align='right'>

<a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'>[/url]

</td></tr></table>";

        }

      }

 

      if ($num == 1)

      {

      $distance=$res->Distance;

      $latitude=$res->Latitude;

      $longitude=$res->Longitude;

      $postal=$res->Postal_code;

      $blockNo=$res-&gt

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.