• 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

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

php mysql + create a friend request system

Nginx RTMP not recording

PHPExcel How to set conditional formatting to change cell background color based on cells values

Laravel Multi-language routes without prefix

Symfony there are no commands defined in the "make" namespace

CodeIgniter 4: Like and Dislike Functionality

Download & Save Zoom Recording in directory by PHP

Changing font color in javascript

Adding custom body class to the custom archive pages

Laravel: Why is my variable not being set while it's in the construct function of the controller?

Unit (real unit test) of test laravel relationship

Detect a fetch request in PHP

Navigation idle on content download

How to modify CSS in a specific page of the WP admin dashboard (backend)

About Contact Privacy policy Terms and conditions