Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The below code will work (Hope this is what you needed):</p> <pre><code>&lt;div class="container"&gt; &lt;div class="row"&gt; &lt;div class="col-lg-6"&gt; &lt;div class="input-group"&gt; &lt;span class="input-group-addon"&gt; &lt;form action="catcheck.php" method="post" role="form"&gt; &lt;label&gt; &lt;input type="checkbox" name="check_list[]" value="value 1" /&gt; Value 1 &lt;/label&gt; &lt;label&gt; &lt;input type="checkbox" name="check_list[]" value="value 2" /&gt; Value 2 &lt;/label&gt; &lt;label&gt; &lt;input type="checkbox" name="check_list[]" value="value 3" /&gt; Value 3 &lt;/label&gt; &lt;label&gt; &lt;input type="checkbox" name="check_list[]" value="value 4" /&gt; Value 4 &lt;/label&gt; &lt;button type="submit" class="btn btn-default"&gt;Submit&lt;/button&gt; &lt;/form&gt; &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>In catcheck.php</p> <p>You can retrieve data as <code>$_POST['check_list']</code> which will return an <code>array</code>. You can begin from:</p> <pre><code>echo "&lt;pre&gt;"; print_r($_POST); echo "&lt;/pre&gt;"; </code></pre> <p><strong>EDIT:</strong></p> <p>The below code will do what you have asked (with doc reference)</p> <pre><code>&lt;div class="row"&gt; &lt;div class="col-lg-6"&gt; &lt;div class="input-group"&gt; &lt;span class="input-group-addon"&gt; &lt;input type="checkbox" name="check_list[]" value="value 1" /&gt; &lt;/span&gt; &lt;input type="text" name="text_value[]" class="form-control" /&gt; &lt;/div&gt; &lt;div class="input-group"&gt; &lt;span class="input-group-addon"&gt; &lt;input type="checkbox" name="check_list[]" value="value 2" /&gt; &lt;/span&gt; &lt;input type="text" name="text_value[]" class="form-control" /&gt; &lt;/div&gt; &lt;div class="input-group"&gt; &lt;span class="input-group-addon"&gt; &lt;input type="checkbox" name="check_list[]" value="value 3" /&gt; &lt;/span&gt; &lt;input type="text" name="text_value[]" class="form-control" /&gt; &lt;/div&gt; &lt;div class="input-group"&gt; &lt;span class="input-group-addon"&gt; &lt;input type="checkbox" name="check_list[]" value="value 4" /&gt; &lt;/span&gt; &lt;input type="text" name="text_value[]" class="form-control" /&gt; &lt;/div&gt; &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>For alignment consider the following CSS:</p> <pre><code>.input-group { margin-bottom:10px; } </code></pre> <p>You can adjust the size of input area by reducing <code>col-lg-6</code> to <code>col-lg-4</code> and so on.</p> <p>Fiddle Demo : <a href="http://jsfiddle.net/27LnT/" rel="nofollow">http://jsfiddle.net/27LnT/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload