donpb2823 2011-10-25 09:44
浏览 40

从表单到表格发布多个下拉列表值

Currently I am creating a form (70+ questions) but I am stuck on one part. I would like to get people to fill in the opening hours for every day of the week.

This will consist of the day of the week followed by 4 dropdowns, from : to (afternoon break) from : to

That part of the form looks like this: http://dgoods.eu/php/form.jpg

How can I get these values into the mysql table? Also please keep in mind that I will have to be able to extract the values from the table and work with them later on.

  • 写回答

1条回答 默认 最新

  • duanbi9202 2011-10-25 09:54
    关注

    You would have to retrieve the data from the form, and add it to a MySQL table using and INSERT statement with the values. You can then get the values from the table using SELECT statements.

    EDIT: I don't know much php, but it would be something like:

    $sql="INSERT INTO tablename (morning_time, evening_time)
               VALUES ('$_POST[combobox1]','$_POST[combobox2]')";
    mysql_real_query($sql,$con)
    

    Also you can use $_GET instead of $_POST

    You can also take a look at this.

    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制