Getting data from a multiple select dropdown with PHP to insert into MySQL

后端 未结 2 1682
死守一世寂寞
死守一世寂寞 2021-01-23 22:51

I have a list of days in my database created with the SET datatype.

SET(\'Mon\',\'Tue\',\'Wed\',\'Thr\',\'Fri\',\'Sat\',\'Sun\')

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-23 23:56

    foreach ($_POST['days'] AS $key => $value) {
      // INSERT ... where $value is one of the values
    }
    

提交回复
热议问题