• 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

Warning: A non-numeric value encountered

Symfony autowiring issues since docker update

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

How do I get friend list from Friends table with counts of friends of my friends

Laravel - Implicit route model binding with soft deleted data

How to get the total hour from starting time to end time in php

Laravel PHP: multiple project run at the same time [closed]

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

PHP Get value from JSON [duplicate]

Display specific shipping method if woocommerce product has specific acf field value

json_encode turns array into an object

The "client_reference_id" argument is not passed

WordPress Subquery returns more than 1 row on SELECT

Add 2 Webcam in one page with WebcamJS

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

About Contact Privacy policy Terms and conditions