• 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

Composer Script echo

How to display table header in every page using FPDF library?

I want to display default profile image if user do not have profile image

Group rows by column and sum another column within groups [duplicate]

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

PHP: remove filename from path

Pass an image through AJAX [duplicate]

calling server using nusoap with complextype

Entity provider not working in security.yml php symfony3.4 ({"code":401,"message":"bad credentials"}.)

Applying programmatically a coupon to an Order in WooCommerce3

Send same name multiple checkbox values via ajax

Phalcon: setStatusCode returns empty response

Override default Auth routes in Laravel 7

Laravel 5 session not persisting after user is logged in

laravel 5.6 bulk inserting json data

About Contact Privacy policy Terms and conditions