开发者

CodeIgniter how to get hidden field value using form_open_multipart()?

I am creating a web application that allows user to insert item data into database. insert_item page is just a regular HTML form. When user submits, the controller inserts item data into Item table, and then redirects user to insert_image page. In this page, I have a hidden fi开发者_C百科eld that contains the item_id (primary key for Item table). This page contains upload file form.

echo form_open_multipart('administration/validate_add_images');
form_hidden('id', $id);
$this->table->add_row(array(form_upload('uploads')));
form_submit('submit', 'Upload Images');

I can't get the value of id when user submits. My question: Is it possible to get the hidden field value using form_open_multipart()?


you should be able to access it just like any other form field

$this->input->post('id');


you can also get to display all your POST ARRAY like this

$this->input->post(NULL, TRUE);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜