如何在 codeigniter 中将表单标签转换为 form_open

How to convert form tag into form_open in codeigniter

这段代码怎么写

<form action="http://<?php echo site_url();?>/loader/login_screen_flow" method="post" enctype="multipart/form-data" name="login_data"> 

<?form_open(........)?> 

使用表单助手格式化。请帮忙。谢谢

试试这个

$attributes = array('name' => 'login_data');

echo form_open_multipart('loader/login_screen_flowd', $attributes);

输出

<form method="post" accept-charset="utf-8" action="http:/example.com/index.php/loader/login_screen_flowd"  name="login_data" enctype="multipart/form-data"/>

同时加载表单助手$this->load->helper('form');

尝试

$attr = array('name' => 'login_data');
echo form_open_multipart('loader/login_screen_flowd', $attr);

尝试如下:

$attribute = array('name'=>'login_data','class'=>'email','id'=>'myform');
echo form_open_multipart('loader/login_screen_flowd', $attribute);