title: serialize() then post it into database?
body: <p>I'm having trouble working this out for inserting input values into database.</p>
  
  <p>I have something like this</p>
  
  <pre><code>$("form#profileName").submit(function(){
      var updateName = $(this).serialize();
      $.post("update.php",{updateName: updateName},function(data){
          alert(data);
      });
      return false;
  });
  </code></pre>
  
  <p>In my PHP I have something like this</p>
  
  <pre><code>if(isset($_POST['updateName'])){
      $fname = $_POST['updateName']['f_name'];
      $mname = $_POST['updateName']['m_name'];
      $lname = $_POST['updateName']['l_name'];
      $altname = $_POST['updateName']['alt_nam'];
  
      echo $fname." ".$mname." ".$lname." ".$altname;
  
  }
  </code></pre>
  
  <p>its echoing out "f f f f" for some reason,</p>
  
  <p>am I doing this correctly?</p>
  
  <p>Thanks</p>