首页上一页 1 下一页尾页 1 条记录 1/1页
PHP从入门到精通
发表在PHP图书答疑
2009-03-30
是否精华
是
否
版块置顶:
是
否
[font size=4][font size=3]在书中最后一个例子中 验证用户代码有错误!
另外我的另外一个问题请帮我解决啊 我试了各种方法都不好使 别的机器也是同样的问题,相关配置都已按书改了 其他的功能都好使就这个不行 该文件请你们看看那里有误[/font][/font]
<?php
include_once 'conn/conn.php';
include_once 'config.php';
$act = $_GET['act'];
if($act == "simple"){
$cont = $_GET['cont'];
if(!empty($_GET['cont'])){
$sql = "select * from tb_commo where name like '%".$cont."%'";
}
}else{
$name = $_GET['name'];
$model = $_GET['model'];
$class = $_GET['stype'];
$sql = "select * from tb_commo where name like '%".$name."%' and model like '%".$model."%' and class like '%".$class."%' ";
}
$rst = $conn->execute($sql);
$searcharr = $rst->GetArray();
$smarty->assign('searcharr',$searcharr);
$smarty->assign('title','查询结果');
$smarty->assign('total',$rst->RecordCount());
$smarty->display('searchrst.tpl');
?>
另外我的另外一个问题请帮我解决啊 我试了各种方法都不好使 别的机器也是同样的问题,相关配置都已按书改了 其他的功能都好使就这个不行 该文件请你们看看那里有误[/font][/font]
<?php
include_once 'conn/conn.php';
include_once 'config.php';
$act = $_GET['act'];
if($act == "simple"){
$cont = $_GET['cont'];
if(!empty($_GET['cont'])){
$sql = "select * from tb_commo where name like '%".$cont."%'";
}
}else{
$name = $_GET['name'];
$model = $_GET['model'];
$class = $_GET['stype'];
$sql = "select * from tb_commo where name like '%".$name."%' and model like '%".$model."%' and class like '%".$class."%' ";
}
$rst = $conn->execute($sql);
$searcharr = $rst->GetArray();
$smarty->assign('searcharr',$searcharr);
$smarty->assign('title','查询结果');
$smarty->assign('total',$rst->RecordCount());
$smarty->display('searchrst.tpl');
?>