如何在PHP中插入多个下拉菜单的值 [英] How to insert the value of multiple drop-down menus in PHP

查看:86
本文介绍了如何在PHP中插入多个下拉菜单的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面可以插入会议详细信息,此插入表单的其中一部分是从db中现有的成员列表中选择出席者.我的问题是:如何在mysql db中插入许多下拉菜单(最大菜单数等于成员总数).这种方法在其他情况下效果很好,我所做的唯一区别是它是文本的输入类型,而不是选择菜单那我在这里错过了什么?

I have a page to insert meeting details, one of the sections of this insert form is selecting the attendance from existing list of members in db. My question is: How to insert many drop-down menus (max number of menus is equal to the total number of members) in mysql db. This way works great in other scenario that I have done the only difference that it was an input type of text instead of select menu So What did I miss here ?

使用所有代码:

addMeeting.php

数据库

推荐答案

我将方案更改为此:我没有选择多个下拉列表,而是创建了多个值的一个选择,并且可以管理用户选择的值的数组.并成功插入它们^^

I changed my scenario to this: instead of having many drop down lists I created one select of multiple values and I could manage getting an array of the user selected values and insert them successfully ^^

所以不要使您的代码复杂化>艰苦的课程:)

So Don't complicate your code > Hard lesson :)

这篇关于如何在PHP中插入多个下拉菜单的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆