title: Dynamically created text boxes not submitting values to php form
body: <p>I've a form in which there are a few elements that i have added through Jquery(dynamically) but the problem is that apart from those variable everything is getting POSTED into the PHP action-file.</p>
  
  <p>I want to get the values of these text boxes in the php file.</p>
  
  <p><strong>CODE:</strong><br>
  <strong>Jquery Code:</strong>  </p>
  
  <pre><code>var temp = $('#waypoints').val();
  var i=1;
  var inputButtons = "&lt;b&gt;Stopover:&lt;/b&gt;&lt;input type='text' class='stopovers' name='stopover"+i+"'&gt;&lt;br&gt;";
  var length = '&lt;input type="hidden" value="'+temp+'" name="length" /&gt;';
  inputButtons+= length;
  
  if(temp==0){
  
    $('div#stopovers').html(""); 
  }
  else if(temp==1){  //if a single way point
  
    $('div#stopovers').html(inputButtons);
  
  }
  
  else{
  while(i&lt;temp){
  
    i++;
    inputButtons += "&lt;b&gt;Stopover:&lt;/b&gt;&lt;input type='text' class='stopovers' name='stopover"+i+"'&gt;&lt;br&gt;";
    $('div#stopovers').html(inputButtons); 
    }
  }
  </code></pre>
  
  <p><strong>PHP Code:</strong>  </p>
  
  <pre><code> $start = $_POST['start'];
  $end = $_POST['end'];
  $length= $_POST['length'];
  echo $length;
  echo "&lt;br&gt;&lt;br&gt;".$start;
  echo "&lt;br&gt;&lt;br&gt;".$end;
  
  
  //inserting into the 'locations' table
      $query = mysql_query("INSERT INTO `locations` (`pid`, `location`, `type`) VALUES ('$package_id', '$start', 'start');");
  
      $query = mysql_query("INSERT INTO `locations` (`pid`, `location`, `type`) VALUES ('$package_id', '$end', 'destination');");
  
  $j=0;
  for($i=1; $i&lt;=$length; $i++){
  
      $stopover='stopover'.$i;
      $stopovers[j]=$_POST[$stopover];
      //echo 'stopover'.$i;
      $query = mysql_query("INSERT INTO `blankand_pts`.`locations` (`pid`, `location`, `type`) VALUES ('$package_id', '$stopovers[j]', 'stopover') ");
      echo "&lt;br&gt;&lt;br&gt;blah: ".$stopovers[j];
      $j++;
  }
  </code></pre>
  
  <p><strong>HTML/Form code:</strong> </p>
  
  <pre><code>    &lt;b&gt;Starting city:&lt;/b&gt;
      &lt;input type="text" id="start" name="start"&gt;&lt;div class="undertext"&gt;Format: New Delhi, India&lt;/div&gt;
  
          &lt;b&gt;Number of stop overs:&lt;/b&gt;
            &lt;select id="waypoints"&gt;
          &lt;option selected="selected"&gt;Select&lt;/option&gt;
          &lt;option value="0"&gt;0&lt;/option&gt;
          &lt;option value="1"&gt;1&lt;/option&gt;
          &lt;option value="2"&gt;2&lt;/option&gt;
          &lt;option value="3"&gt;3&lt;/option&gt;
          &lt;option value="4"&gt;4&lt;/option&gt;
          &lt;option value="5"&gt;5&lt;/option&gt;
          &lt;option value="6"&gt;6&lt;/option&gt;
          &lt;option value="7"&gt;7&lt;/option&gt;
            &lt;/select&gt;&lt;br&gt;
  
          &lt;div id="stopovers"&gt;
  
          &lt;/div&gt;&lt;br&gt;
  
          &lt;b&gt;Destination:&lt;/b&gt;
          &lt;input type="text" id="end" name="end"&gt;&lt;div class="undertext"&gt;Format: New Delhi, India&lt;/div&gt;
          &lt;br /&gt;
  </code></pre>
  
  <p><strong>NOTE: The queries work perfectly fine, when I set manual values</strong></p>