使用form_input通过URL传递信息?

时间:2012-08-27 17:21:42

标签: php codeigniter

我正在尝试使用form_input:

来调用此'搜索'方法
-- controller
function search($item_to_search, $page_to_display)
{
    //do this and that
}

-- view
<?php
    echo form_open("admin/admin_product_c/search/[words come here]/0"); <-- no clue what to do here..
    echo form_input('search_data', 'Type the words to search');
    //submit button here
?>

有没有办法在单击提交按钮时填写并完成form_open,以便我可以通过URL传递值?如果可能的话,我想避免在这种情况下使用Session / POST,因为保持一种格式的东西确实帮助了我。

1 个答案:

答案 0 :(得分:1)

请在此处查看我的回答:

How to make dynamic form action address in codeigniter?

您可以选择两种解决方案 - 使用JavaScript或不使用,我认为第二种适合您。

相关问题