CodeIgniter select_value in form_dropdown

前端 未结 6 1820
-上瘾入骨i
-上瘾入骨i 2020-12-18 12:31

I have a dropdown field in my form and when I hit submit the form goes through validation and if an error happens, return all the value. This work expect for my dropdown meu

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-18 13:14

    Probably you are not validating the form.

    Use this:

    $this-> form_validation-> set_rules ('gender', 'Label', 'xss_clean');
    

    To use:

    
    

    If not please use the form validation, do as follows:

     input-> post ('gender'));?>
    

提交回复
热议问题