title: Get all Form values - working with jquery ajax in PHP
body: <p>I'm using this jquery to serialize my form and pass it to a PHP script called write.php;</p>
  
  <pre><code>$("form").submit(function(){
  
      var_form_data = $(this).serialize();
  
      $.ajax({
         type: "POST",
         url: "write.php",
         data: var_form_data,
         success: function(msg){
           alert( "Data Saved: " + msg );
         }
      });
  
  });
  </code></pre>
  
  <p>Normally, lets say I had a form with the fields Address F_name and S_name, I'd do something like this to get the values into PHP vars;</p>
  
  <pre><code>$Address = $_POST["Address"];
  $F_name = $_POST["F_name"];
  $S_name = $_POST["S_name"];
  </code></pre>
  
  <p>I'd then go onto persist these to the DB</p>
  
  <p>However, this particular form is liable to change on a regular basis. Therefore, I'd like to be able to get at all of the data that was passed through the ajax request in the form of a string that I can explode or an array.</p>
  
  <p>I can then loop through the items in the array and persist them to the DB one by one (i think!).</p>
  
  <p>I hope this makes sense, if I have missed anything or you would like me to explain further please let me know.</p>
  
  <p>As always - all help is very much appreciated.</p>