multiple textbox values storing in same column in php
<p>I an using Javascript when click add button to show multiple text box. but i don't how to store these text box values in database table single column. here i attached my form input coding and javascript for add number of textbox. after submit my form it stores somthing like Array into my table.</p>

<pre><code>&lt;?php
 if(isset($_POST['submit']))
 { 
 Include 'db.php';
 //$digits = 5;
 //$staff_id=STAF.rand(pow(10, $digits-1), pow(10, $digits)-1);
 $fromlocation = $_POST['fromlocation'];
 $fromlatitude = $_POST['fromlatitude'];
 $fromlongitude = $_POST['fromlongitude'];
 $tolocation = $_POST['tolocation'];
 $tolatitude = $_POST['tolatitude'];
 $tolongitude = $_POST['tolongitude'];
 // $routes = $_POST['routes'];
 //$routesmore = $_POST['routes_more'];
 $date=date('Y-m-d H:i:s');
  $status=1;
 //$usertype=1;

  $count = $_POST['count'];

  for($i = 0 ; $i &lt; $count ; $i++)

        {
          //$count++;
            $routesmore = $_POST['routes_more'];

            $routesmore2 = explode('.',  $routesmore[0]);
       }



     $query = mysqli_query($connect,"INSERT INTO `motorpark-db`.`tbl_route`    (`from_location`, `from_latitude`, `from_longitude`, `to_location`, `to_latitude`, `to_longitude`, `route1`, `status`, `created_date`) VALUES ('$fromlocation', '$fromlatitude', '$fromlongitude', '$tolocation', '$tolatitude', '$tolongitude', '$routesmore2', '$status', '$date');");

 if($query)
  {
   header('location:create_route.php#managepart');  
    }
   else
   {
    header('location:create_staff.php');
    }
    }

    ?&gt;
</code></pre>

<p>my input box:</p>

<pre><code>&lt;div class="col-lg-8" id="img_upload"&gt;
                   &lt;!-- &lt;input type="text"  id="file0" name="routes" style="background:none;width:185px;"&gt; --&gt;
                    &lt;div id="divTxt"&gt;&lt;/div&gt;
            &lt;p&gt;&lt;a onClick="addproductimageFormField(); return false;" style="cursor:pointer;width:100px;" id="add_img_btn" class="btn btn-primary"&gt;Add Route&lt;/a&gt;&lt;/p&gt; 
                   &lt;input type="hidden" id="aid" value="1"&gt;
                    &lt;input type="hidden" id="count" name="count" value="0"&gt;
</code></pre>

<p></p>

<p>My Javascript:</p>

<pre><code>&lt;script type="text/javascript"&gt;



    function addproductimageFormField() 
     {
       var id = document.getElementById("aid").value;
       var count_id = document.getElementById("count").value;    
       if(count_id &lt; 2)
          {
            document.getElementById('count').value = parseInt(count_id)+1;
              var count_id_new = document.getElementById("count").value;   
               jQuery.noConflict()
               jQuery("#divTxt").append("&lt;div id='row" + count_id + "'   style='width:100%'&gt;&lt;fieldset class='gllpLatlonPicker'&gt;&lt;label for='text- input'&gt;Stop&lt;/label&gt;&lt;span style='color:red;'&gt; *&lt;/span&gt;&lt;input type='text'  class='gllpSearchField' name='routes_more"+count_id+"' id='file"+count_id_new+"'  /&gt;&lt;/fieldset&gt;&amp;nbsp;&amp;nbsp&lt;a href='#' onClick='removeFormField(\"#row" + count_id + "\"); return false;' style='color:#F60;' &gt;Remove&lt;/a&gt;&lt;/div&gt;");     
        jQuery('#row' + id).highlightFade({speed:1000 });
              id = (id - 1) + 2;
              document.getElementById("aid").value = id;   
              }
              }

        function removeFormField(id)
         {
         //alert(id);
         var count_id = document.getElementById("count").value;  
         document.getElementById('count').value = parseInt(count_id)-1;
         jQuery(id).remove();
          }
         &lt;/script&gt;  
</code></pre>