为了账号安全,请及时绑定邮箱和手机立即绑定

如何插入具有相同名称的多个选择输入

如何插入具有相同名称的多个选择输入

PHP
侃侃尔雅 2022-05-27 16:25:21
有没有办法插入具有相同输入名称的多个值?我的问题是我收到多个值。<div class="giftcard box">    <select name="price" id="colorselector2" style="width:150px;">        <option value="">Select Gift Card Price</option>        @foreach($productDetails->giftattributes as $price)        <option value="{{$price->price}}">$ {{$price->price}}</option>        @endforeach    </select></div><div class="giftcertificate box">    <select name="price" id="colorselector" style="width:150px;">        <option value="">Select Gift Certificate Price</option>        @foreach($productDetails->giftattributes as $price)        <option value="{{$price->price}}">$ {{$price->price}}</option>        @endforeach    </select></div><div class="productasgift box">    <select name="price" id="colorselector1" style="width:150px;">        <option value="">Select Product As Gift Certificate</option>        @foreach($allproduct as $allprice)        <option value="{{$allprice->price}}">$ {{$allprice->price}}</option>        @endforeach    </select></div>
查看完整描述

1 回答

?
RISEBY

TA贡献1856条经验 获得超5个赞

尝试[]在名称的末尾添加,然后在请求中所有具有相同名称的选择/输入都应该在一个数组中



查看完整回答
反对 回复 2022-05-27
  • 1 回答
  • 0 关注
  • 118 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号