• 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

Symfony redirect if already loggedin from login page

How to increase the PHP upload limits [duplicate]

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

How do I truncate a decimal in PHP?

Filter WooCommerce related products by Polylang language

Send same name multiple checkbox values via ajax

MOODLE: What does it mean to aggregate h5p assets?

CodeIgniter 4: Like and Dislike Functionality

How to fix this error : Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI?

Handle error for duplicate entries - PHP/MySQL

Modify microseconds of a PHP DateTime object

woocommerce_wp_select options array from product attribute terms

how to remove white space in select 2

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

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

About Contact Privacy policy Terms and conditions