• 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

Is it possible to change the table name in the migration file-laravel

PHP Startup: Unable to load dynamic library 'openssl' in Ubuntu

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

How to run a shell as root from php (apache)

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

PHP Imap , php 7.4.3 on mac osx catalina

Symfony Error: "An exception has been thrown during the rendering of a template"

JSON Render Issue in Date Object Laravel and PHP 7.4

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

Utf8 encoding issue with Laravel

Cut an arabic string

Laravel whole batch is cancelled if one Job fails

Show only featured products in Woocommerce shop page

Not able to access model in the controller mautic

About Contact Privacy policy Terms and conditions