如何在数据库中保存多个选择值 [英] how to save multiple select values in database

查看:66
本文介绍了如何在数据库中保存多个选择值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,


如何在列表框中显示所有城市,如果用户选择的城市超过城市,我必须将那些城市保存在数据库中,任何人都可以帮助我,


我正在使用php和mysql

Hi friends,


How can i show all cities in a list box, and if user select more than on city i have to save those in database can any one help me,


i am using php and mysql

推荐答案

,您基本上可以遍历列表框中的所有选定项.这是一些入门的链接.

http://onlinetools.org/tricks/using_multiple_select.php [ http://www.phpfreaks.com/forums/index.php?topic=314019.0 [ ^ ]
You basically loop through all the selected items in the listbox. Here''s some links to get you started.

http://onlinetools.org/tricks/using_multiple_select.php[^]
http://www.phpfreaks.com/forums/index.php?topic=314019.0[^]


http://forums.asp.net/t/1675666.aspx/1 [ ^ ]

http://stackoverflow.com/questions/4995406/how-将多个选择框数据保存到数据库中 [ http://www.aleixcortadellas.com/main/2009/03/20/492/ [ ^ ]
http://forums.asp.net/t/1675666.aspx/1[^]

http://stackoverflow.com/questions/4995406/how-to-save-multiple-select-box-data-into-database[^]


For useing php this code should help you ..

http://www.aleixcortadellas.com/main/2009/03/20/492/[^]


这篇关于如何在数据库中保存多个选择值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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