• 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

Google Calendar API batch request PHP

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

How can I pass the list to the component variable in Laravel?

how to make my own auto increment in php?

Saving Data from form to database using AngularJS and php

How to override header set in Apache config with more specific header in a virtual host

XAMPP/SQLSRV: Unable to find Sqlsrv in PHPINFO(); - errors coming from connection

How to add automatically collapse/expand in content wordpress (single.php)?

How do I do HTTP basic authentication using Guzzle?

PHP Discord OAUTH2 code sample not working

SQL to convert multiple rows into a single row of variable length

How to disable widget block editor of WordPress?

Phpunit partial mock + proxy Entity

PHPExcel file download using AJAX call

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

About Contact Privacy policy Terms and conditions