• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

AJAX call fails with SyntaxError: Unexpected end of JSON input

javascriptphpjqueryajax


PHP Snippet 1:

var data = {};
 data['rawFiles'] =$('#projectIDs').val(); 
 data['metadata'] = $('#getData').val();
  data['type']=  $('#submitType').val();
  data['pid']='csv';
   data['command']='data/qcTest'

PHP Snippet 2:

$.ajax({type: "POST", url: posturl, data: JSON.stringify(data), dataType: 'json'})

Related Snippets

Update Total in checkout of Woocommerce with Ajax Request

how to see if database exists with PDO [duplicate]

How can I create a Download Page with post php method?

WordPress - Dynamically add user ID to the end of a URL

get attribute from class not working php 7

What will the best solution for this multiple optional filter?

How to loop a tree array with unknown depth and get array blocks?

how to remove white space in select 2

how to make my own auto increment in php?

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

PHP/HTML: Creating A SubMenu

Dropdown with current value from Mysql

Laravel phpunit test failing authorization

Creating Combinations of Elements

Could not decode a text frame as UTF-8.

About Contact Privacy policy Terms and conditions