How to submit checkbox values with PHP post method

后端 未结 7 580
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 12:48






        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 13:40

    HTML Code ::

       value1 
    value2
    value3
    value4

    php code::

     $checkBoxValue = join(", ", $_POST['arrayValue']);  // here first (,) is user-define
                                                       // means, you can change it whatever
                                                    // you want, even if it can be (space) or others
    

    now you get the whole value of 'checkbox' in one variable

提交回复
热议问题