• 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

MySQL upgrade causing unexpected results on simple WHERE clauses

Send POST data via raw JSON with Postman

PHP and WebView - Cookie doesn't are the same

How to send image,audio or video through the WhatsApp API - PHP

Pagekite error: FAIL: localhost:8080 is down

PHP's array_map including keys

How to implement placeholder in a php file for moodle plugin?

How to redirect to another page after n seconds in wordpress without using javascript?

How can i update or reset my password without entering email field in laravel-8?

Having issue with matching rows in the database using PDO

Applying programmatically a coupon to an Order in WooCommerce3

Populate Dynamic Dropdowns List in Codeigniter

Hi, I am making a contact form thingy, and my php isn't working any reason why?

How to show a popup modal in codeIgniter?

dockerizing Laravel + vue

About Contact Privacy policy Terms and conditions