Hi,
I am trying to undrestand a last function in the "RealEstate" project, before I start building a site.
The function which would be very useful for users is the search by City function at the main list page in the "RealEstate" project,I'v outlined the function which I mean below in the pic;

What I did so far is this;
I created a single table (Table21).
I created a ID field and City field in the Table21.
At the list page in the Visual Editor(html mode) I put this code in the City's field
- <A href="{$row.href}">{$row.1City_value}</A>
And at the Events (Listpage--->ListonLoad) I gave it a custom code as below;
//** Custom code ****
// put your custom code here
global $conn,$smarty;
$rowsearch=array();
$rstt = db_query("SELECT Table21.City, Count(Table21.City) AS CountOfCity FROM Table21 GROUP BY Table21.City", $conn);
$ind=0;
while($data=db_fetch_array($rstt))
{
$rows=array();
$CityName = str_Replace(" ","+",$data["City"]);
$rows["href"]="Table21_list.php?a=search&value=1&SearchFor=".$CityName."&SearchOption=Contains&SearchField=City";
$rows["1City_value"]=$data["City"]." (".$data["CountOfCity"].")";
$rowsearch[$ind]=$rows;
$ind=$ind+1;
}
$smarty->assign("rowsearch", $rowsearch);
***
And I've got this error(pic below);

How should I solve this issue..I'll be thankful for your help!
Nelson