• 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

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

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

Send same name multiple checkbox values via ajax

CSS file not imported in laravel blade view

Alert message after submitting form in PHP

The sum of the user's points

Phalcon: setStatusCode returns empty response

Fatal error: Trait 'LaminasDbAdapterLaminasDbAdapterAdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

Populate Dynamic Dropdowns List in Codeigniter

How to convert the int value to inch in PHP [closed]

Best way to scrolldown onpageload

Hide specific products from unlogged users based in product category in WooCommerce

How to access a var with "-" in PHP [duplicate]

How to use a PHP MVC Controller, one thats invoked by calling a URL, to call and execute more than one function? [duplicate]

Querying only one row from a one to many relationship laravel

About Contact Privacy policy Terms and conditions