• 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

Group data in a multidimensional array based on two columns

protect my blog content

Adding reCAPTCHA v2 into my PHP file

PHP Imap , php 7.4.3 on mac osx catalina

Dynamic dropdown Ajax PHP request

Laravel 5.2: Unable to locate factory with name [default]

cakephp save drag and drop list order to database

add uri parameter to Route name in laravel

How can i hide dt if dd got empty value

I want to display a sweetalert after the inserting of data in my database

LARAVEL: How to fetch id dynamically in a query builder?

CSS file not imported in laravel blade view

Laravel Livewire: jQuery not working in child component loaded via @if statement

Display Brand Name Above Product Title in Woocommerce Cart, Checkout Page, Orders and Email Notification

Can't find vendor/autoload.php for Ratchet

About Contact Privacy policy Terms and conditions