php多条件模糊查询出错
<body><table align="center" border="0">
<tr>
<td><!--#include file="top.asp"--></td>
</tr>
</table>
<table align="center" border="0">
<form method="post" action="ckcx.asp"name="form1">
<tr>
<td colspan="8" align="center" bgcolor="#609B95"><strong>出 库 信 息 查 询</strong></td>
</tr>
<tr>
<td width="100"><div align="center">编号</div></td>
<td width="100"><div align="center">出库编号</div></td>
<td width="100"><div align="center">材料名称</div></td>
<td width="100"><div align="center">开始日期</div></td>
<td width="100"><div align="center">结束日期</div></td>
<td width="100"><div align="center">出库单位</div></td>
<td width="100"><div align="center">入库单位</div></td>
</tr>
<tr>
<td><input name="bh" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input name="ckbh" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input name="clmc" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input name="ksrq" class="wzjz "type="text" size="12" onFocus="this.value=''"></td>
<td><input name="jsrq" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input name="dcdw" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input name="drdw" class="wzjz" type="text" size="12" onFocus="this.value=''"></td>
<td><input type="submit" name="ckc" value="查"></td>
</tr>
</form>
</table>
<?php
if($_POST['ckc']=="查"){
if($_POST['bh']!=""{
if ($cond="" ){
$cond="编号 like '%" & trim($_POST['[bh]) & "%'";
}
else{
$cond = $cond ." AND 编号 like '%" & trim($_POST['bh']) & "%'";
}
echo cond
?>
以上为部分代码,老是报错