• 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

Creating live search with AJAX and CodeIgniter

PHP Get value from JSON [duplicate]

generating a random code in php?

Applying programmatically a coupon to an Order in WooCommerce3

echo language construct is discouraged. (PHP)

PHP DOTENV unable to load env vars

Yii2 select2 database exception number of bound variables does not match number of tokens

Set quantity minimum, maximum and step at product level in Woocommerce

shell errors running php exec

How to fix Call to undefined method AppModelsTableName::factory?

How can i hide dt if dd got empty value

GRPC installed successfully on ubuntu but php is looking for it in another folder

How to insert data from multiple select dropdown values into database?

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

How to convert time from one timezone to another in PHP

About Contact Privacy policy Terms and conditions