Checkbox values into mysql query

后端 未结 2 637
梦谈多话
梦谈多话 2021-01-24 23:23

i have this code which permits me to retrieve data from a checkbox, there isn\'t any mysql included yet, so can you help me modify this?

The form is like this:



        
2条回答
  •  迷失自我
    2021-01-24 23:38

    Use

    foreach($_POST[checkbox] as $key => $value {
        echo PHP_EOL . "Key is => " . $key . " Value is => " . $value . PHP_EOL;
    }
    

    Try this and see the output, you'll see yourself how to proceed further.

提交回复
热议问题