• 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

Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::fetch_assoc() [duplicate]

Reading input in php from terminal

Creating live search with AJAX and CodeIgniter

how to insert data into select2 search input after scan using qrcode

Laravel SQL query midnight time not showing

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

WooCommerce: Add/display Product or Variation custom field everywhere

Create tags in laravel post publishing

How to submit the custom form data in database in WordPress without plugin using ajax?

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

HTML + PHP + PHPMAILER

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

PHP Imap , php 7.4.3 on mac osx catalina

virtctl works when executed via command line but not from php exec()

301 Redirect to remove query string on homepage only

About Contact Privacy policy Terms and conditions