<?php
require_once "config.php";
$k=$_POST['youbian'];
$add=$_POST['add'];
$o=$_POST['dizhi'];
if(!$k==""){
	$cx=mysql_query("select * from $tbname where post like '%".$k."%' or area like '%".$k."%'");
	if(mysql_num_rows($cx)>0){
		while($arr_db=mysql_fetch_array($cx)){
				$arr[]=array('post'=>$arr_db[post],'area'=>$arr_db[area]);
		}
		$smarty->assign("arr_db",$arr); //给模板变量赋值
	}else{
		$all=0;
		$smarty->assign("all",$all);
	}
}
$smarty->display('index.html'); //使用 smarty\templates\templates\index.html 模板
?>