title: jquery $.ajax php side POST serialized form
body: <p>Sorry in advance, I know there are a few discussions about this topic, I am just new to this and have exhausted myself trying to learn it, so I must ask.</p>
  
  <p>problem: I want to send my data in form to php file, this is what I have on js side</p>
  
  <p>after form validation..</p>
  
  <pre><code>else {      
      $.ajax({
          type: 'POST',
          url: 'entry.php',
          cache: false,
          data: $(".contact_form").serializeArray(),
          success: function (data) {
              if (data == "error") {
                  $('.success_box').hide();
                  $('.error_box').show();
              }
              else {
                  $('#sname').val('');
                  $('#email').val('');
                  $('#title').val('');
                  $('#message').val('');
                  $('#photo1').val('');
                  $('#photo2').val('');
                  $('.error_box').hide();
                  $('.success_box').show();
              }
          }
      });
  }
  </code></pre>
  
  <p>my html form has name and id's = sname email title message</p>
  
  <p>I dont know if my javascript is currently sending the data to my php file because I don't know how to access these values on the php page? also since its a js/ajax request I believe I don't need a action for the html form, like I don't call my php file on the html, just on the js, please correct me if this is wrong.</p>
  
  <p>thanks</p>