0

trying to POST data to a php file using ajax.

I am facing a 500 internal error.

However when I check using the developer options available in chrome, the post URL is perfect and so is the POST data.

I am using the following to print any post data

 <?php 
print_r($_POST);

But nothing turns up on the screen.

I believe if the error is due to invalid fields, at least some post data should be printed at the beginning of the php program.

Lost here, I picked up php today and am confused where to start on debugging too.

here is my ajax call:

AJAX call:

$.ajax({
                    type: 'POST',
                    url: 'page/pagename.php',   
                    data: $('#general').serialize(),
                    success: function(html) {...}});
Prashanth
  • 186
  • 3
  • 13

0 Answers0