select2 multiple in php

Solutions on MaxInterview for select2 multiple in php by the best coders in the world

showing results for - "select2 multiple in php"
Louis
15 Jun 2018
1// In your HTML:
2<form method="post">
3  <select class="select2" name="listbox[]" multiple="multiple">
4    <option value="One">One</option>
5    <option value="Two">Two</option>
6    <option value="Three">Three</option>
7    <option value="Four">Four</option>
8  </select>
9  <input type="submit" name="btn" value="Get the Records">
10</form>
11
12// In your Javascript (external .js resource or <script> tag):
13$(document).ready(function() {
14  $('.select2').select2();
15});
16
17// In your PHP
18
19<?php
20
21  if (isset($_POST['btn']) && $_SERVER['REQUET_METHOD']==="POST") {
22    $items = $_POST['listbox'];
23    foreach ($items as $item) {
24      // Run SQL Query or do any other action
25      echo $item.'<br>';
26    }
27  }
28  
29?>
Lisa
06 Jul 2020
1<form action="ResultsDulith.php" id="intermediate" name="inputMachine[]" multiple="multiple" method="post">
2    <select id="selectDuration" name="selectDuration[]" multiple="multiple"> 
3        <option value="1 WEEK" >Last 1 Week</option>
4        <option value="2 WEEK" >Last 2 Week </option>
5        <option value="3 WEEK" >Last 3 Week</option>
6         <option value="4 WEEK" >Last 4 Week</option>
7          <option value="5 WEEK" >Last 5 Week</option>
8           <option value="6 WEEK" >Last 6 Week</option>
9    </select>
10     <input type="submit"/> 
11</form>
12
queries leading to this page
multiple select phpselect multiple values phparray multiple select values in database using phphow to select multiple items phphow to select multiple rows in sql phpdisplay two elemnt from select phpselecting multiple options with checkbox phpreturn multiple value from select php sqlselect multiple items inphpselect html php multiplemultiple select in html phpsend multiple select data in database in phpmultiple sql query in phpmultiple select in phphow to handle the multi select phpphp multi select php select multiple rows wherephp select multiple array elementsdisplay multiple result from select statement phpmultiple selection dropdown phpsql query select with multiple conditions in phphow return multiple value select phpselect2 multiple selected values phpselect multiple php getselect2 set selected value multiple in phpmultiple select dropdown php mysqlselect multiple value phpmultiple select query php mysqlmulti select box in phpselect2 multiple selected values php arrayselect multiple php arrayphp mysql multiple select queryphp select option multiple valuesphp sql select with multiple tablesphp select multiple columnsget values from select multiple phphow to display multi select values in phpselect2 selected value phpstore multiple select2 values in database phpselect query with multiple where condition in phpselect2 php selectedphp select multiple list boxmultiple query in phpselect multiple values from dropdown in phphow to receive multiple select value in phpmultiple select statements in sql query phphread multiple select with phpphp select multiple values selectedmultiple select option php mysqlhow do multiple where statements in php sqlmultiple selected dropdown in phphow to do multiple and in php sqlphp sql select multiple rowsphp multiple select dropdownselect php two elementsphp select multiple option select multiple phpselect 2 with phpmultiple select checkbox in php mysqlhow to multiple select option in phphow to post multiple select option value in phpget from multiple select phphow to get multiple selected values of select box in phpmysql php select multiple rowsmultiple drop down selection in phpdropdown with multiple selection php how to get multiple data at once in select phpselect2 multiple selected values in phphow to store multiple select values in database using phpselect2 value phpselect box multiple selection phpmultiple select lists phpphp sql select from multiple tablesselect2 populate multiple phpin option how select multiple in phpmultiple select statements in sql query phphow to get multi select vale in phpselect multiple html phpselect multiple selected values php arrayget multiple result from select statement phptype select multiple phparrey multiple select values in database using phphow to select multiple options in phpchoosing multiple options phpmultipleselect value in phpselect data from multiple query phpselect2 multiple in phpphp multiple 22 22multiple select function in phpphp multiple selectphp process multiple selectmulti select phpmultiple selection dropdown in phpselect multiple options in phpphp multiple select gethtml multiple select phphow to select multiple value details in phpselect2 multiple in php