无法在单选按钮之间选择

时间:2018-12-29 15:18:01

标签: php laravel

我有以下表单代码,但不能在这些之间进行选择。 我不知道问题出在哪里。我对单选按钮的了解仅在于它们必须具有相同的名称

 <div class="controls">
      <input type="radio" name="pub_place" id="1" value="1" >1
      <input type="radio" name="pub_place" id="2" value="2" >2
      <input type="radio" name="pub_place" id="3" value="3" >3
      <input type="radio" name="pub_place" id="4" value="3" >4
 </div>

这就是全部视图

<form class="form-horizontal" action="{{ url('/save-publicity')}}" method="post" enctype="multipart/form-data">
            {{ csrf_field() }}
        <fieldset>
            <div class="control-group">
                <label class="control-label" for="date01">Publicity Name</label>
                <div class="controls">
                    <input type="text" class="input-xlarge" name="pub_name" required="">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="date01">website Link</label>
                <div class="controls">
                    <input type="text" class="input-xlarge" name="pub_link" required="">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="fileInput">Publicity Image</label>
                <div class="controls">
                    <input class="input-file uniform_on" name="pub_image" id="pub_image" type="file" required="">
                </div>
            </div>
            <div class="control-group hidden-phone">
                <label class="control-label" for="textarea2">Publication status </label>
                <div class="controls">
                    <input type="checkbox" name="pub_status" value="1">
                </div>
            </div>
            <div class="control-group hidden-phone">
                <label class="control-label" for="textarea2">Pub Place </label>
                <div class="controls">
                    <input type="radio" name="pub_place" id="1" value="1" >1
                    <input type="radio" name="pub_place" id="2" value="2" >2
                    <input type="radio" name="pub_place" id="3" value="3" >3
                    <input type="radio" name="pub_place" id="4" value="4" >4
                </div>
                <p>NB:  <strong>Place 1 dimension:</strong> 1170x150 |
                <strong>Place 2 dimension:</strong> 850x100 |
                <strong>Place 3 and 4 dimension:</strong>  270x329</p>
                <img style="width:300px"src="backend/brunch.jpg" alt="" />
                <div class="form-actions">
                    <button type="submit" class="btn btn-primary">Add Publicity</button>
                    <button type="reset" class="btn">Cancel</button>
                </div>
            </div>      
        </fieldset>
    </form>

you can see here the 4 buttons. there is no check when I click on one of them

他们一直在数据库的pub_place列上给我NULL

0 个答案:

没有答案