PHP : insert multiple check boxes values into one MySQL column

前端 未结 5 1914
余生分开走
余生分开走 2020-12-14 13:30

I want to write a simple PHP function to insert values of 10 and 20 check boxes. Now, the issue is: should I insert all values in a single column of MySQL table or should I

5条回答
  •  误落风尘
    2020-12-14 14:02

    use implode function to convert returned array into a string an then insert it into database as normal

    if(isset($_POST['submit'])){
       $result = implode(",",$_POST['games']);
    

    }

    hopefully this will help you. Regards Imran Qasim

提交回复
热议问题