• 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

Why i get wrong output for html markdown?

How to MODIFY a Google Docs document via API using search-and-replace?

Form Validation and Submission to database

How can I convert from a{a{} b{}} to a[a[],b[]] using php preg_match?

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

Chunk and transpose a flat array into rows with a specific number of columns

Vimeo API: how to save a vimeo into a subfolder?

How to create laravel storage symbolic link for production or sub domain system?

WordPress + Nginx on non-standard port behind AWS ELB results in broken links

xdebug 3 not working in ubuntu 20.04 with docker

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

How can i hide dt if dd got empty value

Laravel 5.1 Unknown database type enum requested

Sagepay Error The Vendor failed to provide a RedirectionURL

Pass a select with mysqli_fetch_row to a table

About Contact Privacy policy Terms and conditions