Link to home
Start Free TrialLog in
Avatar of MaryAnnWalsh
MaryAnnWalsh

asked on

How to separate out information in a dynamically created list/menu ?

URL: http://www.century21reu.com/index_new.php = homepage
URL: http://www.century21reu.com/agents/index.php = page I need help with.

This is a real estate site that has recently added a second sales location (Bridgewater). Their main location is (Harrisonburg).

I've created a dynamic list/menu and it shows all the sales agents at Century 21 Real Estate Unlimited. Now I'm stuck as to how to do the next two parts.

1. I want to somehow filter the information so only the Bridgewater agents are one list/menu and the Harrisonburg agents are in the second list/menu. (I've set up a dynamic list/menu that works and then duplicated it for the Harrisonburg location and changed some names on the forms)

2. Once I'm showing the Bridgewater agents, I want to be able to select an agent and go to a page showing all their listings.
-If you go to the homepage  http://www.century21reu.com/index_new.php  and scroll down to "Search for Properties" select "Search Our Agents' Listings » " you'll be taken to a page showing all the agents. There is a dynamically generated code on each agent that I believe I can use for this list/menu (I think) but I can't figure out how to get it into the list/menu.

I'm not a programmer and can just get so far on my own but I don't think this should be too difficult to help me with.
Avatar of Vicker Leung
Vicker Leung
Flag of Hong Kong image

MaryAnnWalsh,

Are the agent's record stored inside a database?

Do do a check whether the database strucutre have stored the agent's location (Bridgewater / Harrisonburg)

If haven't stored, it is not possible to distinguish them and put inside different list

Vicker
Avatar of MaryAnnWalsh
MaryAnnWalsh

ASKER

There is a database with three tables: properties (all the houses/acreage/lots, etc. that are for sale); agents (all agent info including locations of Bridgewater and Harrisonburg) and imagesProperties (images of all the properties that are for sale).

I am working with MySQL/PHP with Dreamweaver 6.1

The database is being "shared" between two web sites: http://www.c21reu.com and http://www.century21reu.com. I am currently working on www.century21.com. The other site has been up and running for about two years.

You can view the page in question at: http://www.century21.com/agents/index.php  I will paste the code into this post. I tried to figure out something about the locations but wasn't too successful and I didn't delete it from the code pasted below. Once we get this location part done, there is a second part we need to get working. Read about the second part in my original post.
_______________________________________________

Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<?php require_once('../Connections/connC21.php'); ?>
<?php
$currentPage = $HTTP_SERVER_VARS["PHP_SELF"];

$maxRows_rsProperties = 10;
$pageNum_rsProperties = 0;
if (isset($HTTP_GET_VARS['pageNum_rsProperties'])) {
  $pageNum_rsProperties = $HTTP_GET_VARS['pageNum_rsProperties'];
}
$startRow_rsProperties = $pageNum_rsProperties * $maxRows_rsProperties;

$colname_rsProperties = "1";
if (isset($HTTP_GET_VARS['AgentID'])) {
  $colname_rsProperties = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['AgentID'] : addslashes($HTTP_GET_VARS['AgentID']);
}
mysql_select_db($database_connC21, $connC21);
$query_rsProperties = sprintf("SELECT * FROM properties WHERE AgentID = '%s'", $colname_rsProperties);
$query_limit_rsProperties = sprintf("%s LIMIT %d, %d", $query_rsProperties, $startRow_rsProperties, $maxRows_rsProperties);
$rsProperties = mysql_query($query_limit_rsProperties, $connC21) or die(mysql_error());
$row_rsProperties = mysql_fetch_assoc($rsProperties);

if (isset($HTTP_GET_VARS['totalRows_rsProperties'])) {
  $totalRows_rsProperties = $HTTP_GET_VARS['totalRows_rsProperties'];
} else {
  $all_rsProperties = mysql_query($query_rsProperties);
  $totalRows_rsProperties = mysql_num_rows($all_rsProperties);
}
$totalPages_rsProperties = ceil($totalRows_rsProperties/$maxRows_rsProperties)-1;

mysql_select_db($database_connC21, $connC21);
$query_rsAgents = "SELECT * FROM agents ORDER BY AgentID ASC";
$rsAgents = mysql_query($query_rsAgents, $connC21) or die(mysql_error());
$row_rsAgents = mysql_fetch_assoc($rsAgents);
$totalRows_rsAgents = mysql_num_rows($rsAgents);

$queryString_rsProperties = "";
if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
  $params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rsProperties") == false && 
        stristr($param, "totalRows_rsProperties") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rsProperties = "&" . implode("&", $newParams);
  }
}
$queryString_rsProperties = sprintf("&totalRows_rsProperties=%d%s", $totalRows_rsProperties, $queryString_rsProperties);

$MM_paramName = "";

// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
$MM_removeList = "&index=";
if ($MM_paramName != "") $MM_removeList .= "&".strtolower($MM_paramName)."=";
$MM_keepURL="";
$MM_keepForm="";
$MM_keepBoth="";
$MM_keepNone="";
// add the URL parameters to the MM_keepURL string
reset ($HTTP_GET_VARS);
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
      $nextItem = "&".strtolower($key)."=";
      if (!stristr($MM_removeList, $nextItem)) {
            $MM_keepURL .= "&".$key."=".urlencode($val);
      }
}
// add the Form parameters to the MM_keepURL string
if(isset($HTTP_POST_VARS)){
      reset ($HTTP_POST_VARS);
      while (list ($key, $val) = each ($HTTP_POST_VARS)) {
            $nextItem = "&".strtolower($key)."=";
            if (!stristr($MM_removeList, $nextItem)) {
                  $MM_keepForm .= "&".$key."=".urlencode($val);
            }
      }
}
// create the Form + URL string and remove the intial '&' from each of the strings
$MM_keepBoth = $MM_keepURL."&".$MM_keepForm;
if (strlen($MM_keepBoth) > 0) $MM_keepBoth = substr($MM_keepBoth, 1);
if (strlen($MM_keepURL) > 0)  $MM_keepURL = substr($MM_keepURL, 1);
if (strlen($MM_keepForm) > 0) $MM_keepForm = substr($MM_keepForm, 1);
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>CENTURY 21 Real Estate Unlimited</TITLE>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

//-->
</script>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/standard.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/mm_menu.js"></SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import url(/assets/style_sheets/main.css);
-->
</style>
<style type="text/css">
<!--
.p7tbsub {background-color: #FFFFCC; border: .1px solid #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif; layer-background-color: #FFFFFF;}
.p7tbsub p {margin: 0px; padding: 6px 12px 12px 0px;}
.p7tbsub a:link {color: #000000;}
.p7tbsub a:visited {color: #666666;}
.p7tbsub a:hover {color: #FF9900;}
.p7tbsub a:active {color: #FF9900;}
.p7tbdn {color: #FF9900 !important; font-weight: bold;}
-->
</style>
<script type="text/javascript" src="/m2scripts/mm2scripts.js"></script>
</HEAD>

<BODY LEFTMARGIN="10" TOPMARGIN="5" RIGHTMARGIN="10" MARGINWIDTH="10" MARGINHEIGHT="5" STYLE="BACKGROUND-COLOR:#FFFFFF" onLoad="P7_setMM2('none',1,3,'Sublink 1.2','p7tbdn');P7_trigMM2();rotateHdr()" onUnload="eradic()">
<?php require_once('../ssi.php'); ?>
<p>
  <script language="JavaScript1.2">
<!--
      mmLoadMenus();
// -->
</script>
</p>
<TABLE WIDTH="752" BORDER="0" align="left" CELLPADDING="0" CELLSPACING="0" id="masterTable">
  <TR VALIGN="top">
    <TD><img src="/images/C21Sign.gif" width="180" height="100"><BR>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
    </TD>
    <TD><table width="547" border="0" cellpadding="0" cellspacing="0" id="topNavHeader">
      <tr>
        <td><img name="photohdr" src="/images/photohdr_buy.jpg" width="547" height="55" alt="" border="0"><br>

        </td>
      </tr>
    </table></TD>
  </TR>
  <TR>
    <TD COLSPAN="3"><IMG SRC="/images/colorpixel.gif" WIDTH="752" HEIGHT="1" ALT="" BORDER="0"><BR>
        <IMG SRC="/images/spacer.gif" WIDTH="752" HEIGHT="19" ALT="" BORDER="0"><BR>
    </TD>
  </TR>
  <TR VALIGN="top">
    <TD>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_top.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_qcksrch.gif" WIDTH="160" HEIGHT="18" ALT="Quick Search" BORDER="0"><BR>
              <STRONG><A HREF="http://www.century21reu.com/buy/"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">advanced
              search</font></A></STRONG><BR>
                          <BR>
                          <IMG SRC="/images/qcksrch_mls.gif" WIDTH="83" HEIGHT="12" ALT="...By MLS #" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkMLS" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="mlsfield" VALUE="MLS #" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
                          <BR>
                          <IMG SRC="/images/qcksrch_lcl.gif" WIDTH="83" HEIGHT="12" ALT="...By Location" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkStreet" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="SCSZipField" VALUE="Street, City, State or Zip" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit2" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><img src="/images/spacer.gif" width="10" height="1" alt="" border="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_btm.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
      </TABLE>
      <BR>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_top.gif" width="180" height="10" alt="" border="0"></TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_myaccnt.gif" WIDTH="130" HEIGHT="30" ALT="My Account" BORDER="0" USEMAP="#myaccnt">
              <MAP NAME="myaccnt">
                <AREA HREF="http://www.century21reu.com/myaccount/Signup.asp" COORDS="0,18,52,30" ALT="Register">
                <AREA HREF="http://www.century21reu.com/myaccount/" COORDS="64,18,107,30" ALT="Sign In">
              </MAP>
              <BR>
              <BR>
              <FONT SIZE="2"><STRONG><U>What is <EM>My Account</EM>?</U></STRONG></FONT><BR>
            How about an online service that helps you manage your searches?<BR>
            <BR>
            Once you <A HREF="http://www.century21reu.com/myaccount/Signup.asp">register</A> your
            email address and create a password, <EM>My Account</EM> is a great
            way to:<BR>
                        <BR>
                        <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="template">
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>save your property descriptions,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>store your search criteria,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>file your agent information,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>and build a custom online library.<BR>
                            </TD>
                          </TR>
                        </TABLE>
                        <BR>
            Still need to <A HREF="http://www.century21reu.com/myaccount/Signup.asp">find
            out more or register</A>?<BR>
                        <BR>
            Or are you registered and ready to <A HREF="http://www.century21reu.com/myaccount/">sign
            in</A>?<BR>
                        <BR>
            We're ready when you are.<BR>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
              <img src="/images/spacer.gif" width="10" height="8"></TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_btm.gif" width="180" height="10" alt="" border="0"><BR>
          </TD>
        </TR>
      </TABLE>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
        <img src="/images/spacer.gif" width="25" height="8"></TD>
    <TD>    <p>Century 21 Real Estate Unlimited</p>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="43%" valign="baseline" bgcolor="#FFFFFF">
            <div align="left"></div>
          </td>
        </tr>
        <tr valign="baseline">
          <td height="46" align="right" nowrap><div align="center">
              <p>Bridgewater Agents</p>
            </div>
          </td>
          <td width="10%" bgcolor="#FFFFFF"><p>&nbsp;</p>
              <p>&nbsp;</p>
          </td>
          <td width="47%" bgcolor="#FFFFFF"><div align="center">Harrisonburg Agents</div></td>
        </tr>
        <tr>
          <td><form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="bridgewaterAgents">
              <div align="center">
                <select name="BridgewaterMenu" id="select4">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_rsAgents['location']; ?>"><?php echo $row_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_rsAgents['ID']?>"><?php echo $row_rsAgents['AgentID']?></option>
                  <?php
} while ($row_rsAgents = mysql_fetch_assoc($rsAgents));
  $rows = mysql_num_rows($rsAgents);
  if($rows > 0) {
      mysql_data_seek($rsAgents, 0);
        $row_rsAgents = mysql_fetch_assoc($rsAgents);
  }
?>
                </select>
              </div>
            </form>
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="harrisonburgAgents" id="harrisonburgAgents">
          <select name="harrisonburgMenu" id="harrisonburgMenu">
            <option value="value">Choose Agent Name</option>
            <option value="<?php echo $row_rsAgents['location']; ?>"><?php echo $row_rsAgents['location']; ?></option>
            <?php
do {  
?>
            <option value="<?php echo $row_rsAgents['ID']?>"><?php echo $row_rsAgents['AgentID']?></option>
            <?php
} while ($row_rsAgents = mysql_fetch_assoc($rsAgents));
  $rows = mysql_num_rows($rsAgents);
  if($rows > 0) {
      mysql_data_seek($rsAgents, 0);
        $row_rsAgents = mysql_fetch_assoc($rsAgents);
  }
?>
          </select>
                      </form>
          </td>
        </tr>
        <tr>
          <td><p>I want to be able to filter out all the Harrisonburg agents. <br>
                  <p>1. I want the code to say: show me all the Agents at Bridgewater.</p>
            <p>2. Then I need to have dynamic code put on the agent's name to
              link to a MasterProperty.php page and show all the listings
            for a particular agent in Bridgewater.</p>
            <p>3. I have a database table - agents - with a field of location
            with two locations: Bridgewater and Harrisonburg</p></td>
          <td>&nbsp;</td>
          <td valign="top"><p>I want to be able to filter out all the Bridgewater
              agents. </p>
            <p>1. I want the code to say: show me all the Agents at Harrisonburg.</p>
            <p>2. Then I need to have dynamic code put on the agent's name to
              link to a MasterProperty.php page and show all the listings
          for a particular agent in Harrisonburg.</p>
          <p>3. I have a database table - agents - with a field of location with
          two locations: Bridgewater and Harrisonburg</p></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    <p>&nbsp;</p></TD>
  </TR>
  <TR>
    <TD COLSPAN="2"><BR>
    </TD>
    <TD CLASS="template"><P align="center"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="19" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/colorpixel.gif" WIDTH="100%" HEIGHT="1" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="5" ALT="" BORDER="0"><BR>
            <A HREF="http://www.century21reu.com/buy/">buy</A> | <A HREF="http://www.century21reu.com/sell/">sell</A> | <A HREF="http://www.century21reu.com/about/">about</A> | <A HREF="http://www.century21reu.com/agents/">agents</A> | <A HREF="http://www.century21reu.com/contact/">contact</A> | <A HREF="http://www.century21reu.com">home</A></P>      
    <!-- #BeginLibraryItem "/Library/copyright.lbi" -->
      <div align="center">
        <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright&copy; CENTURY
            21 Real Estate Corporation. &copy; and SM is a trademark and service
            mark of <br>
    CENTURY 21 Real Estate Corporation. <br>
    Equal Housing opportunity. Each office independently owned and operated.<br>
          </font><font face="Verdana, Arial, Helvetica, sans-serif" size="1">&copy;Copyright
          2005 Century 21 Real Estate Unlimited All Rights Reserved<br>
    website design: <a href="http://www.walshgrafx.com">Walsh Grafx</a></font></p>
      </div>
      <!-- #EndLibraryItem --></TD>
  </TR>
</TABLE>
</BODY>
</HTML>
<?php
mysql_free_result($rsProperties);

mysql_free_result($rsAgents);
?>


MaryAnnWalsh

ok~ first of all
find out these lines

mysql_select_db($database_connC21, $connC21);
$query_rsAgents = "SELECT * FROM agents ORDER BY AgentID ASC";
$rsAgents = mysql_query($query_rsAgents, $connC21) or die(mysql_error());
$row_rsAgents = mysql_fetch_assoc($rsAgents);
$totalRows_rsAgents = mysql_num_rows($rsAgents);

These lines are the part where the agents are selected from the database
If you want to seperate the agents into two list, you better first seperate the database selection

Say your agent database have a column called location which specify where the agent is
Then the part to get bridgewater will be

mysql_select_db($database_connC21, $connC21);
$query_bridge_rsAgents = "SELECT * FROM agents WHERE location = "bridgewater" ORDER BY AgentID ASC";
$bridge_rsAgents = mysql_query($query_bridge_rsAgents, $connC21) or die(mysql_error());
$row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
$totalRows_bridge_rsAgents = mysql_num_rows($bridge_rsAgents);

And for harrisonburg is similar

mysql_select_db($database_connC21, $connC21);
$query_harrison_rsAgents = "SELECT * FROM agents WHERE location = "harrisonburg" ORDER BY AgentID ASC";
$harrison_rsAgents = mysql_query($query_harrison_rsAgents, $connC21) or die(mysql_error());
$row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
$totalRows_harrison_rsAgents = mysql_num_rows($harrison_rsAgents);

Then we have to change where the agents are displayed
Which are the following lines~
This one is for bridgewater, so we have to change like this

<select name="BridgewaterMenu" id="select4">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_bridge_rsAgents['location']; ?>"><?php echo $row_bridge_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_bridge_rsAgents['ID']?>"><?php echo $row_bridge_rsAgents['AgentID']?></option>
                  <?php
} while ($row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents));
  $rows = mysql_num_rows($bridge_rsAgents);
  if($rows > 0) {
      mysql_data_seek($bridge_rsAgents, 0);
       $bridge_row_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
  }
?>
                </select>

Similar for harrisonburg, so I don't explain much here
I hope you got my idea

Vicker
Vicker,
I'm pasting the code below. In my database table, Bridgewater and Harrisonburg start with a capitol and so I made that change to your code.

Check out the page at: http://www.century21reu.com/agents/index.php and this is the message I am seeing:
Parse error: parse error, unexpected T_STRING in /usr/home/web/users/a0027128/html/agents/index.php on line 32
____________________
Here's my code:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<?php require_once('../Connections/connC21.php'); ?>
<?php
$currentPage = $HTTP_SERVER_VARS["PHP_SELF"];

$maxRows_rsProperties = 10;
$pageNum_rsProperties = 0;
if (isset($HTTP_GET_VARS['pageNum_rsProperties'])) {
  $pageNum_rsProperties = $HTTP_GET_VARS['pageNum_rsProperties'];
}
$startRow_rsProperties = $pageNum_rsProperties * $maxRows_rsProperties;

$colname_rsProperties = "1";
if (isset($HTTP_GET_VARS['AgentID'])) {
  $colname_rsProperties = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['AgentID'] : addslashes($HTTP_GET_VARS['AgentID']);
}
mysql_select_db($database_connC21, $connC21);
$query_rsProperties = sprintf("SELECT * FROM properties WHERE AgentID = '%s'", $colname_rsProperties);
$query_limit_rsProperties = sprintf("%s LIMIT %d, %d", $query_rsProperties, $startRow_rsProperties, $maxRows_rsProperties);
$rsProperties = mysql_query($query_limit_rsProperties, $connC21) or die(mysql_error());
$row_rsProperties = mysql_fetch_assoc($rsProperties);

if (isset($HTTP_GET_VARS['totalRows_rsProperties'])) {
  $totalRows_rsProperties = $HTTP_GET_VARS['totalRows_rsProperties'];
} else {
  $all_rsProperties = mysql_query($query_rsProperties);
  $totalRows_rsProperties = mysql_num_rows($all_rsProperties);
}
$totalPages_rsProperties = ceil($totalRows_rsProperties/$maxRows_rsProperties)-1;

mysql_select_db($database_connC21, $connC21);
$query_bridge_rsAgents = "SELECT * FROM agents WHERE location = "Bridgewater" ORDER BY AgentID ASC";
$bridge_rsAgents = mysql_query($query_bridge_rsAgents, $connC21) or die(mysql_error());
$row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
$totalRows_bridge_rsAgents = mysql_num_rows($bridge_rsAgents);

<select name="BridgewaterMenu" id="select4">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_bridge_rsAgents['location']; ?>"><?php echo $row_bridge_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_bridge_rsAgents['ID']?>"><?php echo $row_bridge_rsAgents['AgentID']?></option>
                  <?php
} while ($row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents));
  $rows = mysql_num_rows($bridge_rsAgents);
  if($rows > 0) {
      mysql_data_seek($bridge_rsAgents, 0);
       $bridge_row_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
  }
?>
                </select>

mysql_select_db($database_connC21, $connC21);
$query_harrison_rsAgents = "SELECT * FROM agents WHERE location = "Harrisonburg" ORDER BY AgentID ASC";
$harrison_rsAgents = mysql_query($query_harrison_rsAgents, $connC21) or die(mysql_error());
$row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
$totalRows_harrison_rsAgents = mysql_num_rows($harrison_rsAgents);
<select name="HarrisonburgMenu" id="select4">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_harrison_rsAgents['location']; ?>"><?php echo $row_harrison_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_harrison_rsAgents['ID']?>"><?php echo $row_harrison_rsAgents['AgentID']?></option>
                  <?php
} while ($row_bridge_rsAgents = mysql_fetch_assoc($harrison_rsAgents));
  $rows = mysql_num_rows($harrison_rsAgents);
  if($rows > 0) {
      mysql_data_seek($harrison_rsAgents, 0);
       $harrison_row_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
  }
?>
                </select>





$queryString_rsProperties = "";
if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
  $params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rsProperties") == false && 
        stristr($param, "totalRows_rsProperties") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rsProperties = "&" . implode("&", $newParams);
  }
}
$queryString_rsProperties = sprintf("&totalRows_rsProperties=%d%s", $totalRows_rsProperties, $queryString_rsProperties);

$MM_paramName = "";

// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
$MM_removeList = "&index=";
if ($MM_paramName != "") $MM_removeList .= "&".strtolower($MM_paramName)."=";
$MM_keepURL="";
$MM_keepForm="";
$MM_keepBoth="";
$MM_keepNone="";
// add the URL parameters to the MM_keepURL string
reset ($HTTP_GET_VARS);
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
      $nextItem = "&".strtolower($key)."=";
      if (!stristr($MM_removeList, $nextItem)) {
            $MM_keepURL .= "&".$key."=".urlencode($val);
      }
}
// add the Form parameters to the MM_keepURL string
if(isset($HTTP_POST_VARS)){
      reset ($HTTP_POST_VARS);
      while (list ($key, $val) = each ($HTTP_POST_VARS)) {
            $nextItem = "&".strtolower($key)."=";
            if (!stristr($MM_removeList, $nextItem)) {
                  $MM_keepForm .= "&".$key."=".urlencode($val);
            }
      }
}
// create the Form + URL string and remove the intial '&' from each of the strings
$MM_keepBoth = $MM_keepURL."&".$MM_keepForm;
if (strlen($MM_keepBoth) > 0) $MM_keepBoth = substr($MM_keepBoth, 1);
if (strlen($MM_keepURL) > 0)  $MM_keepURL = substr($MM_keepURL, 1);
if (strlen($MM_keepForm) > 0) $MM_keepForm = substr($MM_keepForm, 1);
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>CENTURY 21 Real Estate Unlimited</TITLE>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

//-->
</script>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/standard.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/mm_menu.js"></SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import url(/assets/style_sheets/main.css);
-->
</style>
<style type="text/css">
<!--
.p7tbsub {background-color: #FFFFCC; border: .1px solid #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif; layer-background-color: #FFFFFF;}
.p7tbsub p {margin: 0px; padding: 6px 12px 12px 0px;}
.p7tbsub a:link {color: #000000;}
.p7tbsub a:visited {color: #666666;}
.p7tbsub a:hover {color: #FF9900;}
.p7tbsub a:active {color: #FF9900;}
.p7tbdn {color: #FF9900 !important; font-weight: bold;}
-->
</style>
<script type="text/javascript" src="/m2scripts/mm2scripts.js"></script>
</HEAD>

<BODY LEFTMARGIN="10" TOPMARGIN="5" RIGHTMARGIN="10" MARGINWIDTH="10" MARGINHEIGHT="5" STYLE="BACKGROUND-COLOR:#FFFFFF" onLoad="P7_setMM2('none',1,3,'Sublink 1.2','p7tbdn');P7_trigMM2();rotateHdr()" onUnload="eradic()">
<?php require_once('../ssi.php'); ?>
<p>
  <script language="JavaScript1.2">
<!--
      mmLoadMenus();
// -->
</script>
</p>
<TABLE WIDTH="752" BORDER="0" align="left" CELLPADDING="0" CELLSPACING="0" id="masterTable">
  <TR VALIGN="top">
    <TD><img src="/images/C21Sign.gif" width="180" height="100"><BR>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
    </TD>
    <TD><table width="547" border="0" cellpadding="0" cellspacing="0" id="topNavHeader">
      <tr>
        <td><img name="photohdr" src="/images/photohdr_buy.jpg" width="547" height="55" alt="" border="0"><br>

        </td>
      </tr>
    </table></TD>
  </TR>
  <TR>
    <TD COLSPAN="3"><IMG SRC="/images/colorpixel.gif" WIDTH="752" HEIGHT="1" ALT="" BORDER="0"><BR>
        <IMG SRC="/images/spacer.gif" WIDTH="752" HEIGHT="19" ALT="" BORDER="0"><BR>
    </TD>
  </TR>
  <TR VALIGN="top">
    <TD>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_top.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_qcksrch.gif" WIDTH="160" HEIGHT="18" ALT="Quick Search" BORDER="0"><BR>
              <STRONG><A HREF="http://www.century21reu.com/buy/"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">advanced
              search</font></A></STRONG><BR>
                          <BR>
                          <IMG SRC="/images/qcksrch_mls.gif" WIDTH="83" HEIGHT="12" ALT="...By MLS #" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkMLS" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="mlsfield" VALUE="MLS #" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
                          <BR>
                          <IMG SRC="/images/qcksrch_lcl.gif" WIDTH="83" HEIGHT="12" ALT="...By Location" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkStreet" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="SCSZipField" VALUE="Street, City, State or Zip" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit2" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><img src="/images/spacer.gif" width="10" height="1" alt="" border="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_btm.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
      </TABLE>
      <BR>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_top.gif" width="180" height="10" alt="" border="0"></TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_myaccnt.gif" WIDTH="130" HEIGHT="30" ALT="My Account" BORDER="0" USEMAP="#myaccnt">
              <MAP NAME="myaccnt">
                <AREA HREF="http://www.century21reu.com/myaccount/Signup.asp" COORDS="0,18,52,30" ALT="Register">
                <AREA HREF="http://www.century21reu.com/myaccount/" COORDS="64,18,107,30" ALT="Sign In">
              </MAP>
              <BR>
              <BR>
              <FONT SIZE="2"><STRONG><U>What is <EM>My Account</EM>?</U></STRONG></FONT><BR>
            How about an online service that helps you manage your searches?<BR>
            <BR>
            Once you <A HREF="http://www.century21reu.com/myaccount/Signup.asp">register</A> your
            email address and create a password, <EM>My Account</EM> is a great
            way to:<BR>
                        <BR>
                        <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="template">
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>save your property descriptions,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>store your search criteria,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>file your agent information,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>and build a custom online library.<BR>
                            </TD>
                          </TR>
                        </TABLE>
                        <BR>
            Still need to <A HREF="http://www.century21reu.com/myaccount/Signup.asp">find
            out more or register</A>?<BR>
                        <BR>
            Or are you registered and ready to <A HREF="http://www.century21reu.com/myaccount/">sign
            in</A>?<BR>
                        <BR>
            We're ready when you are.<BR>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
              <img src="/images/spacer.gif" width="10" height="8"></TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_btm.gif" width="180" height="10" alt="" border="0"><BR>
          </TD>
        </TR>
      </TABLE>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
        <img src="/images/spacer.gif" width="25" height="8"></TD>
    <TD>    <p>Century 21 Real Estate Unlimited</p>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="43%" valign="baseline" bgcolor="#FFFFFF">
            <div align="left"></div>
          </td>
        </tr>
        <tr valign="baseline">
          <td height="46" align="right" nowrap><div align="center">
              <p>Bridgewater Agents</p>
            </div>
          </td>
          <td width="10%" bgcolor="#FFFFFF"><p>&nbsp;</p>
              <p>&nbsp;</p>
          </td>
          <td width="47%" bgcolor="#FFFFFF"><div align="center">Harrisonburg Agents</div></td>
        </tr>
        <tr>
          <td><form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="bridgewaterAgents">
              <div align="center">
                <select name="BridgewaterMenu" id="select4">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_rsAgents['location']; ?>"><?php echo $row_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_rsAgents['ID']?>"><?php echo $row_rsAgents['AgentID']?></option>
                  <?php
} while ($row_rsAgents = mysql_fetch_assoc($rsAgents));
  $rows = mysql_num_rows($rsAgents);
  if($rows > 0) {
      mysql_data_seek($rsAgents, 0);
        $row_rsAgents = mysql_fetch_assoc($rsAgents);
  }
?>
                </select>
              </div>
            </form>
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="harrisonburgAgents" id="harrisonburgAgents">
          <select name="harrisonburgMenu" id="harrisonburgMenu">
            <option value="value">Choose Agent Name</option>
            <option value="<?php echo $row_rsAgents['location']; ?>"><?php echo $row_rsAgents['location']; ?></option>
            <?php
do {  
?>
            <option value="<?php echo $row_rsAgents['ID']?>"><?php echo $row_rsAgents['AgentID']?></option>
            <?php
} while ($row_rsAgents = mysql_fetch_assoc($rsAgents));
  $rows = mysql_num_rows($rsAgents);
  if($rows > 0) {
      mysql_data_seek($rsAgents, 0);
        $row_rsAgents = mysql_fetch_assoc($rsAgents);
  }
?>
          </select>
                      </form>
          </td>
        </tr>
        <tr>
          <td><p>I want to be able to filter out all the Harrisonburg agents. <br>
                  <p>1. I want the code to say: show me all the Agents at Bridgewater.</p>
            <p>2. Then I need to have dynamic code put on the agent's name to
              link to a MasterProperty.php page and show all the listings
            for a particular agent in Bridgewater.</p>
            <p>3. I have a database table - agents - with a field of location
            with two locations: Bridgewater and Harrisonburg</p></td>
          <td>&nbsp;</td>
          <td valign="top"><p>I want to be able to filter out all the Bridgewater
              agents. </p>
            <p>1. I want the code to say: show me all the Agents at Harrisonburg.</p>
            <p>2. Then I need to have dynamic code put on the agent's name to
              link to a MasterProperty.php page and show all the listings
          for a particular agent in Harrisonburg.</p>
          <p>3. I have a database table - agents - with a field of location with
          two locations: Bridgewater and Harrisonburg</p></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    <p>&nbsp;</p></TD>
  </TR>
  <TR>
    <TD COLSPAN="2"><BR>
    </TD>
    <TD CLASS="template"><P align="center"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="19" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/colorpixel.gif" WIDTH="100%" HEIGHT="1" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="5" ALT="" BORDER="0"><BR>
            <A HREF="http://www.century21reu.com/buy/">buy</A> | <A HREF="http://www.century21reu.com/sell/">sell</A> | <A HREF="http://www.century21reu.com/about/">about</A> | <A HREF="http://www.century21reu.com/agents/">agents</A> | <A HREF="http://www.century21reu.com/contact/">contact</A> | <A HREF="http://www.century21reu.com">home</A></P>      
    <!-- #BeginLibraryItem "/Library/copyright.lbi" -->
      <div align="center">
        <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright&copy; CENTURY
            21 Real Estate Corporation. &copy; and SM is a trademark and service
            mark of <br>
    CENTURY 21 Real Estate Corporation. <br>
    Equal Housing opportunity. Each office independently owned and operated.<br>
          </font><font face="Verdana, Arial, Helvetica, sans-serif" size="1">&copy;Copyright
          2005 Century 21 Real Estate Unlimited All Rights Reserved<br>
    website design: <a href="http://www.walshgrafx.com">Walsh Grafx</a></font></p>
      </div>
      <!-- #EndLibraryItem --></TD>
  </TR>
</TABLE>
</BODY>
</HTML>
<?php
mysql_free_result($rsProperties);

mysql_free_result($rsAgents);
?>

Oh no,
the code should be

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<?php require_once('../Connections/connC21.php'); ?>
<?php
$currentPage = $HTTP_SERVER_VARS["PHP_SELF"];

$maxRows_rsProperties = 10;
$pageNum_rsProperties = 0;
if (isset($HTTP_GET_VARS['pageNum_rsProperties'])) {
  $pageNum_rsProperties = $HTTP_GET_VARS['pageNum_rsProperties'];
}
$startRow_rsProperties = $pageNum_rsProperties * $maxRows_rsProperties;

$colname_rsProperties = "1";
if (isset($HTTP_GET_VARS['AgentID'])) {
  $colname_rsProperties = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['AgentID'] : addslashes($HTTP_GET_VARS['AgentID']);
}
mysql_select_db($database_connC21, $connC21);
$query_rsProperties = sprintf("SELECT * FROM properties WHERE AgentID = '%s'", $colname_rsProperties);
$query_limit_rsProperties = sprintf("%s LIMIT %d, %d", $query_rsProperties, $startRow_rsProperties, $maxRows_rsProperties);
$rsProperties = mysql_query($query_limit_rsProperties, $connC21) or die(mysql_error());
$row_rsProperties = mysql_fetch_assoc($rsProperties);

if (isset($HTTP_GET_VARS['totalRows_rsProperties'])) {
  $totalRows_rsProperties = $HTTP_GET_VARS['totalRows_rsProperties'];
} else {
  $all_rsProperties = mysql_query($query_rsProperties);
  $totalRows_rsProperties = mysql_num_rows($all_rsProperties);
}
$totalPages_rsProperties = ceil($totalRows_rsProperties/$maxRows_rsProperties)-1;

mysql_select_db($database_connC21, $connC21);
$query_bridge_rsAgents = "SELECT * FROM agents WHERE location = "Bridgewater" ORDER BY AgentID ASC";
$bridge_rsAgents = mysql_query($query_bridge_rsAgents, $connC21) or die(mysql_error());
$row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
$totalRows_bridge_rsAgents = mysql_num_rows($bridge_rsAgents);

mysql_select_db($database_connC21, $connC21);
$query_harrison_rsAgents = "SELECT * FROM agents WHERE location = "Harrisonburg" ORDER BY AgentID ASC";
$harrison_rsAgents = mysql_query($query_harrison_rsAgents, $connC21) or die(mysql_error());
$row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
$totalRows_harrison_rsAgents = mysql_num_rows($harrison_rsAgents);

$queryString_rsProperties = "";
if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
  $params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rsProperties") == false && 
        stristr($param, "totalRows_rsProperties") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rsProperties = "&" . implode("&", $newParams);
  }
}
$queryString_rsProperties = sprintf("&totalRows_rsProperties=%d%s", $totalRows_rsProperties, $queryString_rsProperties);

$MM_paramName = "";

// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
$MM_removeList = "&index=";
if ($MM_paramName != "") $MM_removeList .= "&".strtolower($MM_paramName)."=";
$MM_keepURL="";
$MM_keepForm="";
$MM_keepBoth="";
$MM_keepNone="";
// add the URL parameters to the MM_keepURL string
reset ($HTTP_GET_VARS);
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
     $nextItem = "&".strtolower($key)."=";
     if (!stristr($MM_removeList, $nextItem)) {
          $MM_keepURL .= "&".$key."=".urlencode($val);
     }
}
// add the Form parameters to the MM_keepURL string
if(isset($HTTP_POST_VARS)){
     reset ($HTTP_POST_VARS);
     while (list ($key, $val) = each ($HTTP_POST_VARS)) {
          $nextItem = "&".strtolower($key)."=";
          if (!stristr($MM_removeList, $nextItem)) {
               $MM_keepForm .= "&".$key."=".urlencode($val);
          }
     }
}
// create the Form + URL string and remove the intial '&' from each of the strings
$MM_keepBoth = $MM_keepURL."&".$MM_keepForm;
if (strlen($MM_keepBoth) > 0) $MM_keepBoth = substr($MM_keepBoth, 1);
if (strlen($MM_keepURL) > 0)  $MM_keepURL = substr($MM_keepURL, 1);
if (strlen($MM_keepForm) > 0) $MM_keepForm = substr($MM_keepForm, 1);
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>CENTURY 21 Real Estate Unlimited</TITLE>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

//-->
</script>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/standard.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/mm_menu.js"></SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import url(/assets/style_sheets/main.css);
-->
</style>
<style type="text/css">
<!--
.p7tbsub {background-color: #FFFFCC; border: .1px solid #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif; layer-background-color: #FFFFFF;}
.p7tbsub p {margin: 0px; padding: 6px 12px 12px 0px;}
.p7tbsub a:link {color: #000000;}
.p7tbsub a:visited {color: #666666;}
.p7tbsub a:hover {color: #FF9900;}
.p7tbsub a:active {color: #FF9900;}
.p7tbdn {color: #FF9900 !important; font-weight: bold;}
-->
</style>
<script type="text/javascript" src="/m2scripts/mm2scripts.js"></script>
</HEAD>

<BODY LEFTMARGIN="10" TOPMARGIN="5" RIGHTMARGIN="10" MARGINWIDTH="10" MARGINHEIGHT="5" STYLE="BACKGROUND-COLOR:#FFFFFF" onLoad="P7_setMM2('none',1,3,'Sublink 1.2','p7tbdn');P7_trigMM2();rotateHdr()" onUnload="eradic()">
<?php require_once('../ssi.php'); ?>
<p>
  <script language="JavaScript1.2">
<!--
     mmLoadMenus();
// -->
</script>
</p>
<TABLE WIDTH="752" BORDER="0" align="left" CELLPADDING="0" CELLSPACING="0" id="masterTable">
  <TR VALIGN="top">
    <TD><img src="/images/C21Sign.gif" width="180" height="100"><BR>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
    </TD>
    <TD><table width="547" border="0" cellpadding="0" cellspacing="0" id="topNavHeader">
      <tr>
        <td><img name="photohdr" src="/images/photohdr_buy.jpg" width="547" height="55" alt="" border="0"><br>

        </td>
      </tr>
    </table></TD>
  </TR>
  <TR>
    <TD COLSPAN="3"><IMG SRC="/images/colorpixel.gif" WIDTH="752" HEIGHT="1" ALT="" BORDER="0"><BR>
        <IMG SRC="/images/spacer.gif" WIDTH="752" HEIGHT="19" ALT="" BORDER="0"><BR>
    </TD>
  </TR>
  <TR VALIGN="top">
    <TD>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_top.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_qcksrch.gif" WIDTH="160" HEIGHT="18" ALT="Quick Search" BORDER="0"><BR>
              <STRONG><A HREF="http://www.century21reu.com/buy/"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">advanced
              search</font></A></STRONG><BR>
                          <BR>
                          <IMG SRC="/images/qcksrch_mls.gif" WIDTH="83" HEIGHT="12" ALT="...By MLS #" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkMLS" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="mlsfield" VALUE="MLS #" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
                          <BR>
                          <IMG SRC="/images/qcksrch_lcl.gif" WIDTH="83" HEIGHT="12" ALT="...By Location" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkStreet" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="SCSZipField" VALUE="Street, City, State or Zip" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit2" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><img src="/images/spacer.gif" width="10" height="1" alt="" border="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_btm.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
      </TABLE>
      <BR>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_top.gif" width="180" height="10" alt="" border="0"></TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_myaccnt.gif" WIDTH="130" HEIGHT="30" ALT="My Account" BORDER="0" USEMAP="#myaccnt">
              <MAP NAME="myaccnt">
                <AREA HREF="http://www.century21reu.com/myaccount/Signup.asp" COORDS="0,18,52,30" ALT="Register">
                <AREA HREF="http://www.century21reu.com/myaccount/" COORDS="64,18,107,30" ALT="Sign In">
              </MAP>
              <BR>
              <BR>
              <FONT SIZE="2"><STRONG><U>What is <EM>My Account</EM>?</U></STRONG></FONT><BR>
            How about an online service that helps you manage your searches?<BR>
            <BR>
            Once you <A HREF="http://www.century21reu.com/myaccount/Signup.asp">register</A> your
            email address and create a password, <EM>My Account</EM> is a great
            way to:<BR>
                        <BR>
                        <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="template">
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>save your property descriptions,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>store your search criteria,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>file your agent information,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>and build a custom online library.<BR>
                            </TD>
                          </TR>
                        </TABLE>
                        <BR>
            Still need to <A HREF="http://www.century21reu.com/myaccount/Signup.asp">find
            out more or register</A>?<BR>
                        <BR>
            Or are you registered and ready to <A HREF="http://www.century21reu.com/myaccount/">sign
            in</A>?<BR>
                        <BR>
            We're ready when you are.<BR>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
              <img src="/images/spacer.gif" width="10" height="8"></TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_btm.gif" width="180" height="10" alt="" border="0"><BR>
          </TD>
        </TR>
      </TABLE>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
        <img src="/images/spacer.gif" width="25" height="8"></TD>
    <TD>    <p>Century 21 Real Estate Unlimited</p>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="43%" valign="baseline" bgcolor="#FFFFFF">
            <div align="left"></div>
          </td>
        </tr>
        <tr valign="baseline">
          <td height="46" align="right" nowrap><div align="center">
              <p>Bridgewater Agents</p>
            </div>
          </td>
          <td width="10%" bgcolor="#FFFFFF"><p>&nbsp;</p>
              <p>&nbsp;</p>
          </td>
          <td width="47%" bgcolor="#FFFFFF"><div align="center">Harrisonburg Agents</div></td>
        </tr>
        <tr>
          <td><form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="bridgewaterAgents">
              <div align="center">
                <select name="BridgewaterMenu" id="select4">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_bridge_rsAgents['location']; ?>"><?php echo $row_bridge_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_bridge_rsAgents['ID']?>"><?php echo $row_bridge_rsAgents['AgentID']?></option>
                  <?php
} while ($row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents));
  $rows = mysql_num_rows($bridge_rsAgents);
  if($rows > 0) {
      mysql_data_seek($bridge_rsAgents, 0);
       $bridge_row_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
  }
?>
                </select>
              </div>
            </form>
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="harrisonburgAgents" id="harrisonburgAgents">
          <select name="HarrisonburgMenu" id="select4">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_harrison_rsAgents['location']; ?>"><?php echo $row_harrison_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_harrison_rsAgents['ID']?>"><?php echo $row_harrison_rsAgents['AgentID']?></option>
                  <?php
} while ($row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents));
  $rows = mysql_num_rows($harrison_rsAgents);
  if($rows > 0) {
      mysql_data_seek($harrison_rsAgents, 0);
       $harrison_row_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
  }
?>
                </select>
                      </form>
          </td>
        </tr>
        <tr>
          <td><p>I want to be able to filter out all the Harrisonburg agents. <br>
               <p>1. I want the code to say: show me all the Agents at Bridgewater.</p>
            <p>2. Then I need to have dynamic code put on the agent's name to
              link to a MasterProperty.php page and show all the listings
            for a particular agent in Bridgewater.</p>
            <p>3. I have a database table - agents - with a field of location
            with two locations: Bridgewater and Harrisonburg</p></td>
          <td>&nbsp;</td>
          <td valign="top"><p>I want to be able to filter out all the Bridgewater
              agents. </p>
            <p>1. I want the code to say: show me all the Agents at Harrisonburg.</p>
            <p>2. Then I need to have dynamic code put on the agent's name to
              link to a MasterProperty.php page and show all the listings
          for a particular agent in Harrisonburg.</p>
          <p>3. I have a database table - agents - with a field of location with
          two locations: Bridgewater and Harrisonburg</p></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    <p>&nbsp;</p></TD>
  </TR>
  <TR>
    <TD COLSPAN="2"><BR>
    </TD>
    <TD CLASS="template"><P align="center"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="19" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/colorpixel.gif" WIDTH="100%" HEIGHT="1" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="5" ALT="" BORDER="0"><BR>
            <A HREF="http://www.century21reu.com/buy/">buy</A> | <A HREF="http://www.century21reu.com/sell/">sell</A> | <A HREF="http://www.century21reu.com/about/">about</A> | <A HREF="http://www.century21reu.com/agents/">agents</A> | <A HREF="http://www.century21reu.com/contact/">contact</A> | <A HREF="http://www.century21reu.com">home</A></P>      
    <!-- #BeginLibraryItem "/Library/copyright.lbi" -->
      <div align="center">
        <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright&copy; CENTURY
            21 Real Estate Corporation. &copy; and SM is a trademark and service
            mark of <br>
    CENTURY 21 Real Estate Corporation. <br>
    Equal Housing opportunity. Each office independently owned and operated.<br>
          </font><font face="Verdana, Arial, Helvetica, sans-serif" size="1">&copy;Copyright
          2005 Century 21 Real Estate Unlimited All Rights Reserved<br>
    website design: <a href="http://www.walshgrafx.com">Walsh Grafx</a></font></p>
      </div>
      <!-- #EndLibraryItem --></TD>
  </TR>
</TABLE>
</BODY>
</HTML>
<?php
mysql_free_result($rsProperties);

mysql_free_result($rsAgents);
?>

Vicker
I took the code you supplied and replaced the existing code in my page with your code.

When I look at the page on the web, I'm getting this message:
Parse error: parse error, unexpected T_STRING in /usr/home/web/users/a0027128/html/agents/index.php on line 32.

Will I also get this error for line 38 once we get 32 fixed?

Let me know what else I can do to help get this up and running?

Mary Ann
Mary Ann

I am sorry that there are mistakes, please change as follows

mysql_select_db($database_connC21, $connC21);
$query_bridge_rsAgents = "SELECT * FROM agents WHERE location = 'Bridgewater' ORDER BY AgentID ASC";
$bridge_rsAgents = mysql_query($query_bridge_rsAgents, $connC21) or die(mysql_error());
$row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
$totalRows_bridge_rsAgents = mysql_num_rows($bridge_rsAgents);

mysql_select_db($database_connC21, $connC21);
$query_harrison_rsAgents = "SELECT * FROM agents WHERE location = 'Harrisonburg' ORDER BY AgentID ASC";
$harrison_rsAgents = mysql_query($query_harrison_rsAgents, $connC21) or die(mysql_error());
$row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
$totalRows_harrison_rsAgents = mysql_num_rows($harrison_rsAgents);

You can notice that the "Bridgewater" is changed to 'Bridgewater'
so for the Harrisonburg

Vicker
Vicker,
That worked. You can view it at: http://www.century21reu.com/agents/index.php

Now, the second part of my request was: I need to have dynamic code put on the agent's name to link to a MasterProperty.php page and show all the listings for a particular agent in Harrisonburg/Bridgewater.

If you re-read my original post, you'll see what I needed as the second part of my dilema.

Thanks

Mary Ann
Vicker,

Sorry to have missed this:

http://www.century21reu.com/agents/index.php

In the upper right corner of the page is a warning:

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/home/web/users/a0027128/html/agents/index.php on line 398
MaryAnn

The problem is on the last line

mysql_free_result($rsAgents);

Please change to

mysql_free_result($bridge_rsAgents);
mysql_free_result($harrison_rsAgents);

And for the second question, please allow me to have some more time to answer.

Cheers :)
Vicker
If it is helpful at all, you might look at the pages I did for the individual agents.

http://www.century21reu.com/index_new.php (in the middle column, scroll down to find an image with "Search Our Properties" and then look below that for "Search Our Agents' Listings »  You're taken to this link: http://www.century21reu.com/buy/agentMaster.php

From there, you can click on any agent  ( I chose Bob Walsh) http://www.century21reu.com/buy/agentDetail.php?AgentID=2  and  it will take you to the individual Agent's listings. Then you click on an image and it will take you to the Detail page for that listing (http://www.century21reu.com/buy/propertyDetail.php?AgentID=2&MLS=47020)

This is what should happen at "http://www.century21reu.com/agents/index.php". I need a link from each individual agent to their properties (like show me all the properties that belong to "Bob Walsh") and then from there (show me the information for this particular property/MLS# the user would click on/select).

These pages are already set up, I just need to have the agents information be able to access this from the "agents/index.php" page.

-http://www.century21reu.com/buy/agentMaster.php code would be similar to the dynamically pulled information code for the Harrisonburg/Bridgewater Agents.

And from there it should go to the subsequent pages.

Hope this makes sense.

I'm on the East Coast and you're on the West Coast so our time differential is getting rather late on my end. if your reply isn't too late this evening I'll try to answer. Otherwise,  I may have to answer you in the morning.

Mary Ann


 
Mary Ann,

okay I think I better answer now then, give me some more points as bonus~~!! haha kidding


First, let's try to modify the harrisonburg one first

<form action="http://www.century21reu.com/buy/agentDetail.php" method="GET" enctype="multipart/form-data" name="harrisonburgAgents" id="harrisonburgAgents">
          <select name="AgentID" id="AgentID">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_harrison_rsAgents['location']; ?>"><?php echo $row_harrison_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_harrison_rsAgents['ID']?>"><?php echo $row_harrison_rsAgents['AgentID']?></option>
                  <?php
} while ($row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents));
  $rows = mysql_num_rows($harrison_rsAgents);
  if($rows > 0) {
      mysql_data_seek($harrison_rsAgents, 0);
       $harrison_row_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
  }
?>
<input type="submit" name="Select" value="Select">
                </select>
                      </form>

Simply replace this with the existing one starting from <form> to </form>
Please becareful~~!! This is for harrisonburg not bridgewater

Vicker
Ok, I did that. But the new drop down box is now over on the  top right hand side. If I click on a name it doesn't do anything.
MaryAnn,

ha~ I think is better I paste the whole code instead of some of it

By the way, you have to click the select button to go forward to the next page~~!!
It is better I guess

Please try the following
Vicker

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<?php require_once('../Connections/connC21.php'); ?>
<?php
$currentPage = $HTTP_SERVER_VARS["PHP_SELF"];

$maxRows_rsProperties = 10;
$pageNum_rsProperties = 0;
if (isset($HTTP_GET_VARS['pageNum_rsProperties'])) {
  $pageNum_rsProperties = $HTTP_GET_VARS['pageNum_rsProperties'];
}
$startRow_rsProperties = $pageNum_rsProperties * $maxRows_rsProperties;

$colname_rsProperties = "1";
if (isset($HTTP_GET_VARS['AgentID'])) {
  $colname_rsProperties = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['AgentID'] : addslashes($HTTP_GET_VARS['AgentID']);
}
mysql_select_db($database_connC21, $connC21);
$query_rsProperties = sprintf("SELECT * FROM properties WHERE AgentID = '%s'", $colname_rsProperties);
$query_limit_rsProperties = sprintf("%s LIMIT %d, %d", $query_rsProperties, $startRow_rsProperties, $maxRows_rsProperties);
$rsProperties = mysql_query($query_limit_rsProperties, $connC21) or die(mysql_error());
$row_rsProperties = mysql_fetch_assoc($rsProperties);

if (isset($HTTP_GET_VARS['totalRows_rsProperties'])) {
  $totalRows_rsProperties = $HTTP_GET_VARS['totalRows_rsProperties'];
} else {
  $all_rsProperties = mysql_query($query_rsProperties);
  $totalRows_rsProperties = mysql_num_rows($all_rsProperties);
}
$totalPages_rsProperties = ceil($totalRows_rsProperties/$maxRows_rsProperties)-1;

mysql_select_db($database_connC21, $connC21);
$query_bridge_rsAgents = "SELECT * FROM agents WHERE location = 'Bridgewater' ORDER BY AgentID ASC";
$bridge_rsAgents = mysql_query($query_bridge_rsAgents, $connC21) or die(mysql_error());
$row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
$totalRows_bridge_rsAgents = mysql_num_rows($bridge_rsAgents);

mysql_select_db($database_connC21, $connC21);
$query_harrison_rsAgents = "SELECT * FROM agents WHERE location = 'Harrisonburg' ORDER BY AgentID ASC";
$harrison_rsAgents = mysql_query($query_harrison_rsAgents, $connC21) or die(mysql_error());
$row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
$totalRows_harrison_rsAgents = mysql_num_rows($harrison_rsAgents);

$queryString_rsProperties = "";
if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
  $params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rsProperties") == false && 
        stristr($param, "totalRows_rsProperties") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rsProperties = "&" . implode("&", $newParams);
  }
}
$queryString_rsProperties = sprintf("&totalRows_rsProperties=%d%s", $totalRows_rsProperties, $queryString_rsProperties);

$MM_paramName = "";

// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
$MM_removeList = "&index=";
if ($MM_paramName != "") $MM_removeList .= "&".strtolower($MM_paramName)."=";
$MM_keepURL="";
$MM_keepForm="";
$MM_keepBoth="";
$MM_keepNone="";
// add the URL parameters to the MM_keepURL string
reset ($HTTP_GET_VARS);
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
     $nextItem = "&".strtolower($key)."=";
     if (!stristr($MM_removeList, $nextItem)) {
          $MM_keepURL .= "&".$key."=".urlencode($val);
     }
}
// add the Form parameters to the MM_keepURL string
if(isset($HTTP_POST_VARS)){
     reset ($HTTP_POST_VARS);
     while (list ($key, $val) = each ($HTTP_POST_VARS)) {
          $nextItem = "&".strtolower($key)."=";
          if (!stristr($MM_removeList, $nextItem)) {
               $MM_keepForm .= "&".$key."=".urlencode($val);
          }
     }
}
// create the Form + URL string and remove the intial '&' from each of the strings
$MM_keepBoth = $MM_keepURL."&".$MM_keepForm;
if (strlen($MM_keepBoth) > 0) $MM_keepBoth = substr($MM_keepBoth, 1);
if (strlen($MM_keepURL) > 0)  $MM_keepURL = substr($MM_keepURL, 1);
if (strlen($MM_keepForm) > 0) $MM_keepForm = substr($MM_keepForm, 1);
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>CENTURY 21 Real Estate Unlimited</TITLE>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

//-->
</script>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/standard.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/mm_menu.js"></SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import url(/assets/style_sheets/main.css);
-->
</style>
<style type="text/css">
<!--
.p7tbsub {background-color: #FFFFCC; border: .1px solid #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif; layer-background-color: #FFFFFF;}
.p7tbsub p {margin: 0px; padding: 6px 12px 12px 0px;}
.p7tbsub a:link {color: #000000;}
.p7tbsub a:visited {color: #666666;}
.p7tbsub a:hover {color: #FF9900;}
.p7tbsub a:active {color: #FF9900;}
.p7tbdn {color: #FF9900 !important; font-weight: bold;}
-->
</style>
<script type="text/javascript" src="/m2scripts/mm2scripts.js"></script>
</HEAD>

<BODY LEFTMARGIN="10" TOPMARGIN="5" RIGHTMARGIN="10" MARGINWIDTH="10" MARGINHEIGHT="5" STYLE="BACKGROUND-COLOR:#FFFFFF" onLoad="P7_setMM2('none',1,3,'Sublink 1.2','p7tbdn');P7_trigMM2();rotateHdr()" onUnload="eradic()">
<?php require_once('../ssi.php'); ?>
<p>
  <script language="JavaScript1.2">
<!--
     mmLoadMenus();
// -->
</script>
</p>
<TABLE WIDTH="752" BORDER="0" align="left" CELLPADDING="0" CELLSPACING="0" id="masterTable">
  <TR VALIGN="top">
    <TD><img src="/images/C21Sign.gif" width="180" height="100"><BR>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
    </TD>
    <TD><table width="547" border="0" cellpadding="0" cellspacing="0" id="topNavHeader">
      <tr>
        <td><img name="photohdr" src="/images/photohdr_buy.jpg" width="547" height="55" alt="" border="0"><br>

        </td>
      </tr>
    </table></TD>
  </TR>
  <TR>
    <TD COLSPAN="3"><IMG SRC="/images/colorpixel.gif" WIDTH="752" HEIGHT="1" ALT="" BORDER="0"><BR>
        <IMG SRC="/images/spacer.gif" WIDTH="752" HEIGHT="19" ALT="" BORDER="0"><BR>
    </TD>
  </TR>
  <TR VALIGN="top">
    <TD>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_top.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_qcksrch.gif" WIDTH="160" HEIGHT="18" ALT="Quick Search" BORDER="0"><BR>
              <STRONG><A HREF="http://www.century21reu.com/buy/"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">advanced
              search</font></A></STRONG><BR>
                          <BR>
                          <IMG SRC="/images/qcksrch_mls.gif" WIDTH="83" HEIGHT="12" ALT="...By MLS #" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkMLS" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="mlsfield" VALUE="MLS #" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
                          <BR>
                          <IMG SRC="/images/qcksrch_lcl.gif" WIDTH="83" HEIGHT="12" ALT="...By Location" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkStreet" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="SCSZipField" VALUE="Street, City, State or Zip" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit2" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><img src="/images/spacer.gif" width="10" height="1" alt="" border="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_btm.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
      </TABLE>
      <BR>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_top.gif" width="180" height="10" alt="" border="0"></TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_myaccnt.gif" WIDTH="130" HEIGHT="30" ALT="My Account" BORDER="0" USEMAP="#myaccnt">
              <MAP NAME="myaccnt">
                <AREA HREF="http://www.century21reu.com/myaccount/Signup.asp" COORDS="0,18,52,30" ALT="Register">
                <AREA HREF="http://www.century21reu.com/myaccount/" COORDS="64,18,107,30" ALT="Sign In">
              </MAP>
              <BR>
              <BR>
              <FONT SIZE="2"><STRONG><U>What is <EM>My Account</EM>?</U></STRONG></FONT><BR>
            How about an online service that helps you manage your searches?<BR>
            <BR>
            Once you <A HREF="http://www.century21reu.com/myaccount/Signup.asp">register</A> your
            email address and create a password, <EM>My Account</EM> is a great
            way to:<BR>
                        <BR>
                        <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="template">
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>save your property descriptions,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>store your search criteria,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>file your agent information,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>and build a custom online library.<BR>
                            </TD>
                          </TR>
                        </TABLE>
                        <BR>
            Still need to <A HREF="http://www.century21reu.com/myaccount/Signup.asp">find
            out more or register</A>?<BR>
                        <BR>
            Or are you registered and ready to <A HREF="http://www.century21reu.com/myaccount/">sign
            in</A>?<BR>
                        <BR>
            We're ready when you are.<BR>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
              <img src="/images/spacer.gif" width="10" height="8"></TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_btm.gif" width="180" height="10" alt="" border="0"><BR>
          </TD>
        </TR>
      </TABLE>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
        <img src="/images/spacer.gif" width="25" height="8"></TD>
    <TD>    <p>Century 21 Real Estate Unlimited</p>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="43%" valign="baseline" bgcolor="#FFFFFF">
            <div align="left"></div>
          </td>
        </tr>
        <tr valign="baseline">
          <td height="46" align="right" nowrap><div align="center">
              <p>Bridgewater Agents</p>
            </div>
          </td>
          <td width="10%" bgcolor="#FFFFFF"><p>&nbsp;</p>
              <p>&nbsp;</p>
          </td>
          <td width="47%" bgcolor="#FFFFFF"><div align="center">Harrisonburg Agents</div></td>
        </tr>
        <tr>
          <td><form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="bridgewaterAgents">
              <div align="center">
                <select name="BridgewaterMenu" id="select4">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_bridge_rsAgents['location']; ?>"><?php echo $row_bridge_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_bridge_rsAgents['ID']?>"><?php echo $row_bridge_rsAgents['AgentID']?></option>
                  <?php
} while ($row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents));
  $rows = mysql_num_rows($bridge_rsAgents);
  if($rows > 0) {
      mysql_data_seek($bridge_rsAgents, 0);
       $bridge_row_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
  }
?>
                </select>
              </div>
            </form>
          </td>
          <td>&nbsp;</td>
          <td><form action="http://www.century21reu.com/buy/agentDetail.php" method="GET" enctype="multipart/form-data" name="harrisonburgAgents" id="harrisonburgAgents">
         <div align="center">
              <select name="AgentID" id="AgentID">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_harrison_rsAgents['location']; ?>"><?php echo $row_harrison_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_harrison_rsAgents['ID']?>"><?php echo $row_harrison_rsAgents['AgentID']?></option>
                  <?php
} while ($row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents));
  $rows = mysql_num_rows($harrison_rsAgents);
  if($rows > 0) {
      mysql_data_seek($harrison_rsAgents, 0);
       $harrison_row_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
  }
?>
<input type="submit" name="Select" value="Select">
                </select></div>
                      </form></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><p>I want to be able to filter out all the Harrisonburg agents. <br>
               <p>1. I want the code to say: show me all the Agents at Bridgewater.</p>
            <p>2. Then I need to have dynamic code put on the agent's name to
              link to a MasterProperty.php page and show all the listings
            for a particular agent in Bridgewater.</p>
            <p>3. I have a database table - agents - with a field of location
            with two locations: Bridgewater and Harrisonburg</p></td>
          <td>&nbsp;</td>
          <td valign="top"><p>I want to be able to filter out all the Bridgewater
              agents. </p>
            <p>1. I want the code to say: show me all the Agents at Harrisonburg.</p>
            <p>2. Then I need to have dynamic code put on the agent's name to
              link to a MasterProperty.php page and show all the listings
          for a particular agent in Harrisonburg.</p>
          <p>3. I have a database table - agents - with a field of location with
          two locations: Bridgewater and Harrisonburg</p></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    <p>&nbsp;</p></TD>
  </TR>
  <TR>
    <TD COLSPAN="2"><BR>
    </TD>
    <TD CLASS="template"><P align="center"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="19" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/colorpixel.gif" WIDTH="100%" HEIGHT="1" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="5" ALT="" BORDER="0"><BR>
            <A HREF="http://www.century21reu.com/buy/">buy</A> | <A HREF="http://www.century21reu.com/sell/">sell</A> | <A HREF="http://www.century21reu.com/about/">about</A> | <A HREF="http://www.century21reu.com/agents/">agents</A> | <A HREF="http://www.century21reu.com/contact/">contact</A> | <A HREF="http://www.century21reu.com">home</A></P>      
    <!-- #BeginLibraryItem "/Library/copyright.lbi" -->
      <div align="center">
        <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright&copy; CENTURY
            21 Real Estate Corporation. &copy; and SM is a trademark and service
            mark of <br>
    CENTURY 21 Real Estate Corporation. <br>
    Equal Housing opportunity. Each office independently owned and operated.<br>
          </font><font face="Verdana, Arial, Helvetica, sans-serif" size="1">&copy;Copyright
          2005 Century 21 Real Estate Unlimited All Rights Reserved<br>
    website design: <a href="http://www.walshgrafx.com">Walsh Grafx</a></font></p>
      </div>
      <!-- #EndLibraryItem --></TD>
  </TR>
</TABLE>
</BODY>
</HTML>
<?php
mysql_free_result($rsProperties);

mysql_free_result($bridge_rsAgents);
mysql_free_result($harrison_rsAgents);
?>
That appears to work fine for Harrisonburg.

I tried making Bridgewater work but wasn't successful.

Mary Ann
Mary Ann

post your changed bridgewater
let me debug that

Vicker
Ok, check it out. http://www.century21reu.com/agents

I have everything working except one thing. In my Commercial list/menu I have a blank line above the first name. It shouldn't be there but I don't know how to get rid of it.

I'll post the code here so you can look at the Commercial section.

________________________________________________

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<?php require_once('../Connections/connC21.php'); ?>
<?php
$currentPage = $HTTP_SERVER_VARS["PHP_SELF"];

$maxRows_rsProperties = 10;
$pageNum_rsProperties = 0;
if (isset($HTTP_GET_VARS['pageNum_rsProperties'])) {
  $pageNum_rsProperties = $HTTP_GET_VARS['pageNum_rsProperties'];
}
$startRow_rsProperties = $pageNum_rsProperties * $maxRows_rsProperties;

$colname_rsProperties = "1";
if (isset($HTTP_GET_VARS['AgentID'])) {
  $colname_rsProperties = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['AgentID'] : addslashes($HTTP_GET_VARS['AgentID']);
}
mysql_select_db($database_connC21, $connC21);
$query_rsProperties = sprintf("SELECT * FROM properties WHERE AgentID = '%s'", $colname_rsProperties);
$query_limit_rsProperties = sprintf("%s LIMIT %d, %d", $query_rsProperties, $startRow_rsProperties, $maxRows_rsProperties);
$rsProperties = mysql_query($query_limit_rsProperties, $connC21) or die(mysql_error());
$row_rsProperties = mysql_fetch_assoc($rsProperties);

if (isset($HTTP_GET_VARS['totalRows_rsProperties'])) {
  $totalRows_rsProperties = $HTTP_GET_VARS['totalRows_rsProperties'];
} else {
  $all_rsProperties = mysql_query($query_rsProperties);
  $totalRows_rsProperties = mysql_num_rows($all_rsProperties);
}
$totalPages_rsProperties = ceil($totalRows_rsProperties/$maxRows_rsProperties)-1;

mysql_select_db($database_connC21, $connC21);
$query_bridge_rsAgents = "SELECT * FROM agents WHERE location = 'Bridgewater' ORDER BY AgentID ASC";
$bridge_rsAgents = mysql_query($query_bridge_rsAgents, $connC21) or die(mysql_error());
$row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
$totalRows_bridge_rsAgents = mysql_num_rows($bridge_rsAgents);

mysql_select_db($database_connC21, $connC21);
$query_harrison_rsAgents = "SELECT * FROM agents WHERE location = 'Harrisonburg' ORDER BY AgentID ASC";
$harrison_rsAgents = mysql_query($query_harrison_rsAgents, $connC21) or die(mysql_error());
$row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
$totalRows_harrison_rsAgents = mysql_num_rows($harrison_rsAgents);

$colname_commer_rsAgents = "1";
if (isset($HTTP_GET_VARS['Commercial'])) {
  $colname_commer_rsAgents = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['Commercial'] : addslashes($HTTP_GET_VARS['Commercial']);
}
mysql_select_db($database_connC21, $connC21);
$query_commer_rsAgents = sprintf("SELECT * FROM agents WHERE category = 'Commercial' ORDER BY AgentID ASC", $colname_commer_rsAgents);
$commer_rsAgents = mysql_query($query_commer_rsAgents, $connC21) or die(mysql_error());
$row_commer_rsAgents = mysql_fetch_assoc($commer_rsAgents);
$totalRows_commer_rsAgents = mysql_num_rows($commer_rsAgents);

mysql_select_db($database_connC21, $connC21);
$query_alpha_rsAgents = "SELECT * FROM agents ORDER BY AgentID ASC";
$alpha_rsAgents = mysql_query($query_alpha_rsAgents, $connC21) or die(mysql_error());
$row_alpha_rsAgents = mysql_fetch_assoc($alpha_rsAgents);
$totalRows_alpha_rsAgents = mysql_num_rows($alpha_rsAgents);

$queryString_rsProperties = "";
if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
  $params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rsProperties") == false && 
        stristr($param, "totalRows_rsProperties") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rsProperties = "&" . implode("&", $newParams);
  }
}
$queryString_rsProperties = sprintf("&totalRows_rsProperties=%d%s", $totalRows_rsProperties, $queryString_rsProperties);

$MM_paramName = "";

// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
$MM_removeList = "&index=";
if ($MM_paramName != "") $MM_removeList .= "&".strtolower($MM_paramName)."=";
$MM_keepURL="";
$MM_keepForm="";
$MM_keepBoth="";
$MM_keepNone="";
// add the URL parameters to the MM_keepURL string
reset ($HTTP_GET_VARS);
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
     $nextItem = "&".strtolower($key)."=";
     if (!stristr($MM_removeList, $nextItem)) {
          $MM_keepURL .= "&".$key."=".urlencode($val);
     }
}
// add the Form parameters to the MM_keepURL string
if(isset($HTTP_POST_VARS)){
     reset ($HTTP_POST_VARS);
     while (list ($key, $val) = each ($HTTP_POST_VARS)) {
          $nextItem = "&".strtolower($key)."=";
          if (!stristr($MM_removeList, $nextItem)) {
               $MM_keepForm .= "&".$key."=".urlencode($val);
          }
     }
}
// create the Form + URL string and remove the intial '&' from each of the strings
$MM_keepBoth = $MM_keepURL."&".$MM_keepForm;
if (strlen($MM_keepBoth) > 0) $MM_keepBoth = substr($MM_keepBoth, 1);
if (strlen($MM_keepURL) > 0)  $MM_keepURL = substr($MM_keepURL, 1);
if (strlen($MM_keepForm) > 0) $MM_keepForm = substr($MM_keepForm, 1);
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>CENTURY 21 Real Estate Unlimited</TITLE>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

//-->
</script>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/standard.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="/Century21reu.com/assets/scripts/mm_menu.js"></SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import url(/assets/style_sheets/main.css);
-->
</style>
<style type="text/css">
<!--
.p7tbsub {background-color: #FFFFCC; border: .1px solid #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif; layer-background-color: #FFFFFF;}
.p7tbsub p {margin: 0px; padding: 6px 12px 12px 0px;}
.p7tbsub a:link {color: #000000;}
.p7tbsub a:visited {color: #666666;}
.p7tbsub a:hover {color: #FF9900;}
.p7tbsub a:active {color: #FF9900;}
.p7tbdn {color: #FF9900 !important; font-weight: bold;}
-->
</style>
<script type="text/javascript" src="/m2scripts/mm2scripts.js"></script>
</HEAD>

<BODY LEFTMARGIN="10" TOPMARGIN="5" RIGHTMARGIN="10" MARGINWIDTH="10" MARGINHEIGHT="5" STYLE="BACKGROUND-COLOR:#FFFFFF" onLoad="P7_setMM2('none',1,3,'Sublink 1.2','p7tbdn');P7_trigMM2();rotateHdr()" onUnload="eradic()">
<?php require_once('../ssi.php'); ?>
<p>
  <script language="JavaScript1.2">
<!--
     mmLoadMenus();
// -->
</script>
</p>
<TABLE WIDTH="752" BORDER="0" align="left" CELLPADDING="0" CELLSPACING="0" id="masterTable">
  <TR VALIGN="top">
    <TD><img src="/images/C21Sign.gif" width="180" height="100"><BR>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
    </TD>
    <TD><table width="547" border="0" cellpadding="0" cellspacing="0" id="topNavHeader">
      <tr>
        <td><img name="photohdr" src="/images/photohdr_buy.jpg" width="547" height="55" alt="" border="0"><br>

        </td>
      </tr>
    </table></TD>
  </TR>
  <TR>
    <TD COLSPAN="3"><IMG SRC="/images/colorpixel.gif" WIDTH="752" HEIGHT="1" ALT="" BORDER="0"><BR>
        <IMG SRC="/images/spacer.gif" WIDTH="752" HEIGHT="19" ALT="" BORDER="0"><BR>
    </TD>
  </TR>
  <TR VALIGN="top">
    <TD>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_top.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_qcksrch.gif" WIDTH="160" HEIGHT="18" ALT="Quick Search" BORDER="0"><BR>
              <STRONG><A HREF="http://www.century21reu.com/buy/"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">advanced
              search</font></A></STRONG><BR>
                          <BR>
                          <IMG SRC="/images/qcksrch_mls.gif" WIDTH="83" HEIGHT="12" ALT="...By MLS #" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkMLS" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="mlsfield" VALUE="MLS #" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
                          <BR>
                          <IMG SRC="/images/qcksrch_lcl.gif" WIDTH="83" HEIGHT="12" ALT="...By Location" BORDER="0"> <BR>
                          <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                            <FORM name="frmQkStreet" method="post" action="http://www.century21reu.com/buy/ResidentialSearchResults.asp">
                              <TR>
                                <TD><INPUT TYPE="text" NAME="SCSZipField" VALUE="Street, City, State or Zip" CLASS="textboxQS" SIZE="18" onFocus="this.select()">
                                    <input name="Submit2" type="Submit" class="formBtnQS" value="Find" alt="Click to find">
                                    <BR>
                                </TD>
                                <TD ALIGN="right"> <BR>
                                </TD>
                              </TR>
                            </FORM>
                          </TABLE>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><img src="/images/spacer.gif" width="10" height="1" alt="" border="0"><BR>
          </TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><IMG SRC="/images/ltcolumn_btm.gif" WIDTH="180" HEIGHT="10" ALT="" BORDER="0"><BR>
          </TD>
        </TR>
      </TABLE>
      <BR>
      <TABLE WIDTH="180" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_top.gif" width="180" height="10" alt="" border="0"></TD>
        </TR>
        <TR>
          <TD BACKGROUND="/images/ltliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="10" HEIGHT="8" ALT="" BORDER="0"><BR>
          </TD>
          <TD CLASS="template"><IMG SRC="/images/hdr_myaccnt.gif" WIDTH="130" HEIGHT="30" ALT="My Account" BORDER="0" USEMAP="#myaccnt">
              <MAP NAME="myaccnt">
                <AREA HREF="http://www.century21reu.com/myaccount/Signup.asp" COORDS="0,18,52,30" ALT="Register">
                <AREA HREF="http://www.century21reu.com/myaccount/" COORDS="64,18,107,30" ALT="Sign In">
              </MAP>
              <BR>
              <BR>
              <FONT SIZE="2"><STRONG><U>What is <EM>My Account</EM>?</U></STRONG></FONT><BR>
            How about an online service that helps you manage your searches?<BR>
            <BR>
            Once you <A HREF="http://www.century21reu.com/myaccount/Signup.asp">register</A> your
            email address and create a password, <EM>My Account</EM> is a great
            way to:<BR>
                        <BR>
                        <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="template">
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>save your property descriptions,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>store your search criteria,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>file your agent information,<BR>
                            </TD>
                          </TR>
                          <TR VALIGN="top">
                            <TD><STRONG>&middot;</STRONG>&nbsp;<BR>
                            </TD>
                            <TD>and build a custom online library.<BR>
                            </TD>
                          </TR>
                        </TABLE>
                        <BR>
            Still need to <A HREF="http://www.century21reu.com/myaccount/Signup.asp">find
            out more or register</A>?<BR>
                        <BR>
            Or are you registered and ready to <A HREF="http://www.century21reu.com/myaccount/">sign
            in</A>?<BR>
                        <BR>
            We're ready when you are.<BR>
          </TD>
          <TD BACKGROUND="/images/rtliner.gif"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
              <img src="/images/spacer.gif" width="10" height="8"></TD>
        </TR>
        <TR>
          <TD COLSPAN="3"><img src="/images/ltcolumn_btm.gif" width="180" height="10" alt="" border="0"><BR>
          </TD>
        </TR>
      </TABLE>
    </TD>
    <TD><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="1" ALT="" BORDER="0"><BR>
        <img src="/images/spacer.gif" width="25" height="8"></TD>
    <TD>    <p>Century 21 Real Estate Unlimited</p>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="43%" valign="baseline" bgcolor="#FFFFFF">
            <div align="left"></div>
          </td>
        </tr>
        <tr valign="baseline">
          <td height="46" align="right" nowrap><div align="center">
              <p>Bridgewater Agents</p>
            </div>
          </td>
          <td width="10%" bgcolor="#FFFFFF"><p>&nbsp;</p>
              <p>&nbsp;</p>
          </td>
          <td width="47%" bgcolor="#FFFFFF"><div align="center">Harrisonburg Agents</div></td>
        </tr>
        <tr>
         
              <td><form action="http://www.century21reu.com/buy/agentDetail.php" method="GET" enctype="multipart/form-data" name="bridgewaterAgents" id="bridgewaterAgents">
              <div align="center">
                <select name="AgentID" id="AgentID">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_bridge_rsAgents['location']; ?>"><?php echo $row_bridge_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_bridge_rsAgents['ID']?>"><?php echo $row_bridge_rsAgents['AgentID']?></option>
                  <?php
} while ($row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents));
  $rows = mysql_num_rows($bridge_rsAgents);
  if($rows > 0) {
      mysql_data_seek($bridge_rsAgents, 0);
        $row_bridge_rsAgents = mysql_fetch_assoc($bridge_rsAgents);
  }
?>
<input type="submit" name="Select" value="Select">
                        </select>
              </div>
            </form>
         
             
              </td>
          <td>&nbsp;</td>
          <td><form action="http://www.century21reu.com/buy/agentDetail.php" method="GET" enctype="multipart/form-data" name="harrisonburgAgents" id="harrisonburgAgents">
         <div align="center">
              <select name="AgentID" id="AgentID">
                  <option value="value">Choose Agent Name</option>
                  <option value="<?php echo $row_harrison_rsAgents['location']; ?>"><?php echo $row_harrison_rsAgents['location']; ?></option>
                  <?php
do {  
?>
                  <option value="<?php echo $row_harrison_rsAgents['ID']?>"><?php echo $row_harrison_rsAgents['AgentID']?></option>
                  <?php
} while ($row_harrison_rsAgents = mysql_fetch_assoc($harrison_rsAgents));
  $rows = mysql_num_rows($harrison_rsAgents);
  if($rows > 0) {
      mysql_data_seek($harrison_rsAgents, 0);
       $harrison_row_rsAgents = mysql_fetch_assoc($harrison_rsAgents);
  }
?>
<input type="submit" name="Select" value="Select">
                </select></div>
                      </form></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><p>&nbsp;</td>
          <td>&nbsp;</td>
          <td valign="top"><p>&nbsp;</p>
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="46"><div align="center">Commercial Agents</div></td>
          <td>&nbsp;</td>
          <td><div align="center">Relocation Contact</div></td>
        </tr>
        <tr>
              <td><form action="http://www.century21reu.com/buy/agentDetail.php" method="GET" enctype="multipart/form-data" name="commercialAgents" id="commercialAgents">
            <div align="center">
              <select name="AgentID" id="AgentID">
                <option value="value">Choose Agent Name</option>
                <option value="<?php echo $row_commer_rsAgents['category']; ?>"><?php echo $row_commer_rsAgents['Commercial']; ?></option>
                <?php
do {  
?>
                <option value="<?php echo $row_commer_rsAgents['ID']?>"><?php echo $row_commer_rsAgents['AgentID']?></option>
                <?php
} while ($row_commer_rsAgents = mysql_fetch_assoc($commer_rsAgents));
  $rows = mysql_num_rows($commer_rsAgents);
  if($rows > 0) {
      mysql_data_seek($commer_rsAgents, 0);
        $row_commer_rsAgents = mysql_fetch_assoc($commer_rsAgents);
  }
?>
                <input type="submit" name="Select" value="Select">
              </select>
            </div>
          </form></td>
              <td>&nbsp;</td>
          <td><form action="http://www.century21reu.com/about/relocation.php" method="GET" enctype="multipart/form-data" name="relocationContact" id="relocationContact">
            <div align="center">
              <select name="relocation" id="relocation">
                  <option value="Relocation Contact">Relocation Contact</option>
                  <option value="Judy Hartman">Judy Hartman</option>
                  <input type="submit" name="Select" value="Select">
                      </select>
            </div>
          </form></td>
        </tr>
        <tr>
          <td>How do I get rid of the blank line above the names?</td>
          <td height="46"><div align="center"></div></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="46"><div align="center">Agents Alphabetically</div></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="center">
            <form action="http://www.century21reu.com/buy/agentDetail.php" method="GET" enctype="multipart/form-data" name="agentsAlpha" id="agentsAlpha">
              <select name="AgentID" id="AgentID">
                <option value="value">Choose Agent Name</option>
                <?php
do {  
?>
                <option value="<?php echo $row_alpha_rsAgents['ID']?>"><?php echo $row_alpha_rsAgents['AgentID']?></option>
                <?php
} while ($row_alpha_rsAgents = mysql_fetch_assoc($alpha_rsAgents));
  $rows = mysql_num_rows($alpha_rsAgents);
  if($rows > 0) {
      mysql_data_seek($alpha_rsAgents, 0);
        $row_alpha_rsAgents = mysql_fetch_assoc($alpha_rsAgents);
  }
?>
                <input type="submit" name="Select" value="Select">
              </select>
            </form>
          </div></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    <p>&nbsp;</p></TD>
  </TR>
  <TR>
    <TD COLSPAN="2"><BR>
    </TD>
    <TD CLASS="template"><P align="center"><IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="19" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/colorpixel.gif" WIDTH="100%" HEIGHT="1" ALT="" BORDER="0"><BR>
            <IMG SRC="/images/spacer.gif" WIDTH="1" HEIGHT="5" ALT="" BORDER="0"><BR>
            <A HREF="http://www.century21reu.com/buy/">buy</A> | <A HREF="http://www.century21reu.com/sell/">sell</A> | <A HREF="http://www.century21reu.com/about/">about</A> | <A HREF="http://www.century21reu.com/agents/">agents</A> | <A HREF="http://www.century21reu.com/contact/">contact</A> | <A HREF="http://www.century21reu.com">home</A></P>      
    <!-- #BeginLibraryItem "/Library/copyright.lbi" -->
      <div align="center">
        <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright&copy; CENTURY
            21 Real Estate Corporation. &copy; and SM is a trademark and service
            mark of <br>
    CENTURY 21 Real Estate Corporation. <br>
    Equal Housing opportunity. Each office independently owned and operated.<br>
          </font><font face="Verdana, Arial, Helvetica, sans-serif" size="1">&copy;Copyright
          2005 Century 21 Real Estate Unlimited All Rights Reserved<br>
    website design: <a href="http://www.walshgrafx.com">Walsh Grafx</a></font></p>
      </div>
      <!-- #EndLibraryItem --></TD>
  </TR>
</TABLE>
</BODY>
</HTML>
<?php
mysql_free_result($rsProperties);

mysql_free_result($bridge_rsAgents);
mysql_free_result($harrison_rsAgents);

mysql_free_result($commer_rsAgents);

mysql_free_result($alpha_rsAgents);
?>
MaryAnn,

I guess this is the problem inside the database
Please check the database contents

Vicker
I checked the database and there isn't a line before Philip Constable or Steven Hill. If it were the case it was a database issue, why wouldn't a blank line appear before the name in the Harrisonburg and Alphabetical list/menus? Not trying to be argumentative!

Now that you have provided the solution for this Post on Harrisonburg/Bridgewater issue. Would you want to do a couple more things for me? I would expect to provide more points.

Problem 1: On the site I'm working on now www.century21reu.com, as you know there are two locations. The newest one is Bridgewater and has only been open for about a month. I would like to be able to have a dynamic location address appear in the Agent's profile.  I will have a new field in the database: agencyAddress.My problem is that I don't know how to code this address information within the database so the address will display as shown below (display with four lines). I know each unique address has to be applied to each agent's information in the database. I'm pretty confident I can define my recordset to get this information to load on the appropriate pages where there is agent information.

All agents in Harrisonburg would have this address:
Century 21 Real Estate Unlimited
8 Pleasant Hill Road
Harrisonburg, VA 22801
(540) 574-2100 - (888) 317-8149

And all agents in Bridgewater would have this address:
Century 21 Real Estate Unlimited
630 N. Main
Bridgewater, VA 22812
(540) 828-4054

Problem 2: On the orignal Century 21 site: www.c21reu.com there is an admin section at: http://www.c21reu.com/admin.html  Add a Property.

There is a dynamic list/menu for Agents and that works fine. If you scroll down there is a list/menu for Property Type and that works fine until you go to Update an Existing Property. All the information loads in except for the Property Type and then Judy, the office Manager has to scroll down and reselect the Property Type. She's asked me a couple of times if I could fix that.

I believe this has to be fixed on the Add a Property page and I beleive that would involve making the list/menu for Property Type dynamic.

It might make more sense if you were to look at the live site:
http://www.c21reu.com/admin.html
Choose "Add a Property" and scroll down to see the Property Type list/menu.

Now to see how this reacts when Judy needs to edit a property,
Choose "Update an Existing Property"  At the next page, input 49206, you're taken to a page with all the information for property number 49206. If you scroll down, you'll see that the only information that didn't load is the property type.

Can you make this problem go away? It would make the Office Manager very happy.

If you would be interested in working on this new part, let's discuss points and how I can add those points to this post. I'm very new to this EE and now sure how to add points before signing off on the whole project.

Mary Ann
Mary Ann,

Sorry that I come back late, is busy these days

OKAY~ I say database problem is that

You see for the bridgewater and the harrisonburg agent list
You have the

choose agent name
bridgewater/harrisonburg
and then the names

So I guess you want the same thing for the commercial agents
Check inside your database, see if there is a line with commercial but blanked somewhere to fix this issue

----------------------------------------------------------------------------------------------------------------------------------

Respond to question 1

Actually there are two ways to cope with this line break problem

1. Build up an input form (html) which will port the data into the database
Then in the form, you can simply type enter to break each line and so funny that MySQL will store this up exactly you want
However you have to write much, e.g. the server side page that will get the form data

2. Simply go inside the database, and add <br> within the address to force it show a line break when show out

----------------------------------------------------------------------------------------------------------------------------------

Respond to question 2

This is a quite tricky part that I worked before quite a few times

You need to compare values when making the list here
Usually you will make a list like the following (copying from your previous scripts)

<select name="AgentID" id="AgentID">
<option value="value">Choose Agent Name</option>
<?php
      do {  
?>
      <option value="<?php echo $row_alpha_rsAgents['ID']?>"><?php echo $row_alpha_rsAgents['AgentID']?></option>
<?php
      } while ($row_alpha_rsAgents = mysql_fetch_assoc($alpha_rsAgents));
      $rows = mysql_num_rows($alpha_rsAgents);
      if($rows > 0) {
            mysql_data_seek($alpha_rsAgents, 0);
            $row_alpha_rsAgents = mysql_fetch_assoc($alpha_rsAgents);
      }
?>
<input type="submit" name="Select" value="Select">
</select>

And what you need to do is to do a simple comparison with the value that you want to set
Say somewhere in your script you get the agentID value like
$agentID

I use agent here to cope with the scripts that I posted

So the script will be changed as follows

<select name="AgentID" id="AgentID">
<option value="value">Choose Agent Name</option>
<?php
      do {  
?>
      <option value="<?php echo $row_alpha_rsAgents['ID']?>"

// ************************ lines that I added
<?php

      if ($agentID == $row_alpha_rsAgents['ID'])
      {
            echo (" selected");
      }

?>      
// ************************ lines that I added

      ><?php echo $row_alpha_rsAgents['AgentID']?></option>

      <?php
      } while ($row_alpha_rsAgents = mysql_fetch_assoc($alpha_rsAgents));
      $rows = mysql_num_rows($alpha_rsAgents);
      if($rows > 0) {
            mysql_data_seek($alpha_rsAgents, 0);
            $row_alpha_rsAgents = mysql_fetch_assoc($alpha_rsAgents);
      }
?>
<input type="submit" name="Select" value="Select">
</select>

That's it, it is not that difficult actually

----------------------------------------------------------------------------------------------------------------------------------

Talking about the points.
Actually EE's policy is that every post can only ask one question

But I think is not that strict, I just wanna help somebody out
And I think you pay for those points right? haha

So here's the way you can do, is up to you.

1. Directly adding this question's point (a maximum is 500 I think)
2. Posting another new question with the points and simple accept my response at that post so that I can get the points

Cheers :)
Vicker
ASKER CERTIFIED SOLUTION
Avatar of Vicker Leung
Vicker Leung
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, Sorry to be so late replying to your last post. I had started a draft to you in my Outlook email but didn't finish it and somehow it didn't get saved in my Draft folder. So, I'll begin again.

Commercial Agent problem: I did a sort on Category which has only Residential and Commercial. Only two Commercial agents came up and they are the two I have in the drop down list.There were not any records that were blank in the Category column.  I had a meeting with the owner of the Real Estate Agency and he said it was fine with him the way it was. So, I'll leave it like it is - until something brilliant crosses my mind as to what could be causing it. But, I'm not going to let it bother me.

The line break problem: I applied your suggestion of placing a break at the end of each line and it works beautifully. So now, the office address of each agent appears next to their name.

The Dynamic list menu for Property Type: I realize you set up the one for the Agents for me for the site I'm currently working on. However, problem two was not for Agents but for Property Types: Acreage; Commercial: Farm; Lot; Multi-Family; Residential; Townhouse. I truthfully haven't had a chance to work with it to see if I can edit the code you posted to make it work with the property types.

I am still killing other dragons on the site. After my meeting with the owner of the agency, he has requested several other things in addition to what I've been working on. I still don't have the search box working; he is going to wait on the My Account box that appears on each page until we get something finished and get the site going live; he now wants the "View All Area Properties" to appear in a framed page which should be so easy and is giving me all kinds of problems; having to rewrite most of the copy that was taken from Century 21 Corporate site. I haven't looked yet to see if EE has Creative Writers, but I do have a friend with an English major in writing.

Would you be interested in helping with the search box? If so, let me know and I'll post a new question.

For now, I'm going to close this out and hopefully will be able to add extra points to the score. Thanks for all your help. I've learned a lot. I bumped the points up to 740 which is all I have at this time. It's no problem to buy more points. So, if this is not enough perhaps if you want to solve the problem with my search box, I can add more to that to compensate for this post.

Mary Ann
Vicker,
It says the most I can add is up to 500 so I'll try again.
Mary Ann,

About the commercial agent problem

You can do a comparison between the bridgewater/harrisonburg database with the commercial one
I guess you can find a record inside the b/h database which have one of the record's agent name is b/h

So what you got to do is to insert a record into the commercial one with the agent name --> commercial agent

------------------------------------------------------------------------------------------------------------------------

Good news hearing it works in the line break problem

------------------------------------------------------------------------------------------------------------------------

If you really want me to fix the property problem for you
Do put the codes up here. What I suggest is you let me download the file instead of pasting the code right here :p

------------------------------------------------------------------------------------------------------------------------

Haha. Points are okay, Mary Ann. (everyone wants more of cos~ Hahahaha kidding~)

Search function?? Please make it in details in a new topic and I will try my very best to help.

------------------------------------------------------------------------------------------------------------------------

Cheers
Vicker
Thank you for continuing on with me. It would be most helpful to me if you could supply your email address. Mine is: info@walshgrafx.com

I don't mind supplying you with the user/password to the FTP site but I don't want to put it on this Post for everyone to see. I tried to access your web site but Microsoft said there was a problem installing Simple or Traditional Chinese (I can't remember which it is that is needed for your site) And then I thought well, if it's all in Chinese that does me now good. You are much smarter knowing at least two languages and I only know English and some really bad Spanish.

The page in question is: http://www.c21reu.com/addProperty.php. And the part that needs solving is the "Choose a Property Type" field.

Since I've looked at your profile, I now know you are living in Hong Kong or somewhere in China. I live in the United States on the East Coast (Atlantic Ocean) in the state of Virginia in the city of Harrisonburg which is in the beautiful Shenandoah Valley. So, time wise we are about twelve hours difference. Right now it is 8:35pm Sunday evening and I believe you are twelve hours ahead. So it would be 8:35am Monday morning your time.

I had the priveledge of spending about two weeks in Asia about ten years ago: Hong Kong; Tokyo and Osaka. I would come back to Hong Kong in a heartbeat. Especially enjoyed taking the train up near to Canton (we didn't have papers to go to China) and seeing the countyside with the enormously tall apartment buildings. Loved buying LyChee Nuts at the local market as we got off the train; loved the pastries; loved the people, loved the air-conditioned train because it was July when we were there. But most importantly I loved Stanley Market and my introduction to Chicken Satay on a scewer with peanut sauce. I've tried to make it but it never comes out tasting like what I had in Hong Kong.

Send me your email address and I'll email the information you need.

Mary Ann
MaryAnn,

Actually you can simply use the one I am using in EE, vicker@gmail.com

Haha~ it seems that you trust me too much XDDD. Thanks first.

Yup. I am Hong Kong student actually. I think is quite common in here that we at least know 2 language. I know a little Japanese too :p Ya~ we do have a great time difference but that's ok.

Ha~ if you someday will come to Hong Kong, I can be your tour guide haha.

Do send me your thing so that I can help.

But still I will keep answering you through here, so you better open another topic. Because it is good to let everybody have a chance to help you. And this is the rules here too.

Cheers :)
Vicker