• 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

How to add a sidebar to Woocommerce Shop Page?

Laravel Passport - Not able to get token string in response?

Split array into 4-element chunks then implode into strings

Twig - How to check if variable is a number / integer

using random function but it's displaying duplicates

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

get folder directory from input type file - PHP

Transpose csv file data [duplicate]

Results page in other window

The "client_reference_id" argument is not passed

IlluminateDatabaseQueryException could not find driver [duplicate]

hidden INPUT value not available in $_POST

Magento 2 - Controller returning blank page

PHP Form Not Inserting

Unable to match results of php hash_hmac() and coldfusion hmac()

About Contact Privacy policy Terms and conditions