0
我正在寫一個管理面板的頁面,我正在製作該列表成員結果。我想在此頁面上搜索表單以搜索特定成員。由於我在此頁面上有其他表單,因此此搜索表單的操作必須採用與我的控制器不同的方法。問題是沒有任何後期值傳輸到搜索方法。我究竟做錯了什麼?如何在CodeIgniter中的另一個頁面上使用一個頁面上的表單?
class Users extends MY_Controller {
function __construct(){
parent::__construct();
}
function index(){
if(!$this->form_validation->run()){
$this->load->view('users/index');
}
}
function search(){
$criteria = $this->input->post('search_criteria');
}
}
這有點像什麼我的看法是:
<?php echo form_open('users/search'); ?>
<input type="text" name="search_criteria">