• 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

backup files to google drive using PHP

Image upload not working through ajax Laravel

Transform array, set each array element with parent key php

How to run or debug php on Visual Studio Code (VSCode)

500 Internal Server Error on Ajax request. Not sure the origin of the problem

Alert message after submitting form in PHP

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

Transpose multidimensional array and join values with commas

Which is faster php date functions or carbon?

insert multiple rows in a saveall in cakephp

Split array into 4-element chunks then implode into strings

JQuery content editable div and text box on submit not sending POST

Sum array values of a column within each column of an array with 3 levels

PHP, how to convert Int value to Week days

How to Install Composer Require doctrine/dbal

About Contact Privacy policy Terms and conditions