html textarea post,php - codeigniter post html textarea - Stack Overflow

when i try to post html from my textarea the variable value is empty and form_validation show error message that the input is required......

i search for solution and i didn't found ....

this is my code

echo validation_errors();

echo form_dropdown('cat_name', $plan_cat);

?>

اسم الراسل باللغه الانجليزية

العنوان

الرساله

/*

$options = array(

'name' => 'message',

'id' => 'elm1'

);

echo form_textarea($options);

*/

?>

echo form_close();

?>

and this is my controller code :

$this->load->library('form_validation');

$this->form_validation->set_rules('from', 'الراسل', 'required|min_length[8]');

$this->form_validation->set_rules('subject', 'عنوان الرساله', 'required|min_length[6]');

$this->form_validation->set_rules('message', 'الرساله', 'trim|required|min_length[10]|xss_clean');

if($this->form_validation->run() == false){

$user_id = $this->session->userdata('user_id');

$send = array(

'title' => 'ارسل الرساله',

'plan' => $this->user_plan->get_plan($user_id)

);

$this->load->library('parser');

$this->parser->parse('header', $send);

$this->parser->parse('send_message', $send);

$this->parser->parse('footer', $send);

}else{

$user_id = $this->session->userdata('user_id');

$plan_cat = $this->input->post('cat_name');

$from = $this->input->post('from', true);

$subject = $this->input->post('subject', true);

$message = $this->input->post('message', true);

$message = ''.$message.'';

i hope to find way to solve this :)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值