• 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

GuzzleHttp Hangs When Using Localhost

browsersync doesn't work with XAMPP

WAMP Virtual Host not working

could not find driver Debian SQL Server PHP

PHP Include for HTML?

If action is on a different page do I use fwrite function

image source not readable

Open a popup box after receiving result from ajax

how to insert data into select2 search input after scan using qrcode

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

Problem with fetching data from database in Laravel

Why getting "Build step 'Execute shell' marked build as failure" error while creating a backup tar for files

Center point of multiple gps coordinates with php

How do I refresh a DIV content?

Insert database rows from columns of data from associative array of indexed arrays

About Contact Privacy policy Terms and conditions