• 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

Toggle between a textbox and a select using PHP

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

renameColumn migration fails for existing column with columns does not exist error

How do I set the maximum php memory limit

backup files to google drive using PHP

How to properly start Laravel 8 with Bootstrap & authentication

Object of class stdClass could not be converted to string error

PHP cURL (SSL certificate problem: self signed certificate in certificate chain)

Encrypt in php and decrypt in Dart(flutter)

Post Form Data To phpmyadmin Database

Fatal error: Array callback has to contain indices 0 and 1

Send same name multiple checkbox values via ajax

Last order would be re-order in wooCommerce. How is it possible?

Xdebug 3 not showing in phpinfo on m1 Monterey

About Contact Privacy policy Terms and conditions