用_post 获取里面的值ABC。
然后连接数据库,再通过这个值ABC,找到数据库里面的信息。
然后跳转到B页面,跳转到B页面之后,
在B页面的其他input 中,默认显示abc主键的信息。(即动态的,根据ABC来匹配)
我现在的疑问是,请问要怎么写?附上代码。 谢谢
页面A:
<form action="__URL__/search_order" method="post">
<div class="ordersearch">
<p>搜索</p>
<input type="text" name="orders" style="width:350px; height:50px; font-size:20px;"></input>
<input type="submit" value="搜索" style="display:block; width:110px; height:30px; margin-top:30px;"></input>
</div>
</form>
页面B,也是独立的页面:<li><p>中文:</p><input name="namec" disabled ></input></li>
<li><p>英文:</p><input name="namee" disabled></input></li>
<li><p>价格:</p><input name="Price" disabled></input></li>
PHP代码:<?php
namespace Home\Controller;
use Think\Controller;
class SearchController extends Controller{
function search(){
$this->display();
}
function search_order(){
$orders=$_POST['orders'];
$m=M('hyxt_data');
$arr=$m->field($orders)->select();
$this->assign('data',$arr);
$this->success('please wait...','show');
}
function show(){
$this->display();
}
}
我不清楚我描述的是不是很清晰,我真的不会写了,我PHP很水,求大神指点,谢谢 最佳答案
