• 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

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

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

Google Gmail API - How to login programatically?

how to remove %20 in the url in php

PhP how to calculate moments with variables rows

Which is faster php date functions or carbon?

Open a popup box after receiving result from ajax

How avoid Moved Permanently The document has moved here

Can I use a WooCommerce function without any WooCommerce page?

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

PHP array sort and remove duplicates by two field values

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

Using array_intersect on a multi-dimensional array

How to display MySQL table using php and edit it in a web browser

hidden INPUT value not available in $_POST

About Contact Privacy policy Terms and conditions