• 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

Unable to get password for the instance created from AMI

codeigniter 4 running error first time with xampp

How to debug in WooCommerce 3+

Use Python plotly chart in PHP

Malformed MIME header error in Symfony 5.3

What is the function of the (new Date()).getTime() in PHP?

Autoloading classes in PHPUnit using Composer and autoload.php

Read users and passwords from a txt file

PHP - Store information with NO database

PHP file_get_contents function

Google Gmail API - How to login programatically?

Best way to scrolldown onpageload

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

Wordpress wpdb->delete issue

Convert PHP array into HTML tag attributes separated by spaces

About Contact Privacy policy Terms and conditions