• 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

Apply session id from request header

PHP each() function replacement

How to get an Array value inside an object in an array Php [duplicate]

(Cache::lock()) -> get() -- Under what conditions does it return false?

selected value from the listbox in php

MySQL default time format UTC or GMT?

Comma separated list from array with "and" before last element

How avoid Moved Permanently The document has moved here

php retrieve specific data onclick from database in a list format

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

PHPExcel_IOFactory::createWriter causes wrong behaviour

Laravel Schedule not sending email

Open a popup box after receiving result from ajax

PHP my timezone is no setting up in PHP.ini File in xampp

Laravel Pagination links() not working

About Contact Privacy policy Terms and conditions