dsasd12314 2012-06-15 21:51
浏览 30
已采纳

如何在CodeIgniter中的单个post参数中传递多个值?

I'm using the chosen UI library to select multiple values for a post param named 'tables'. In the Chrome network console I can check that is working how I expected:

Form data
checkin:2012-06-15 16:00:00
checkout:2012-06-15 17:00:00
tables:14
tables:15
tables:16
customer:28

But when I try to recover this tables info in the controller

var_dump($this->input->post('tables'));

I only got the last value for the param:

string(2) "16"

I also try var_dump($_POST['tables']); when the same result.

  • 写回答

3条回答 默认 最新

  • dongyupen6269 2012-06-15 21:54
    关注

    Try calling it tables[] instead of tables.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作