hy parseerror?

hy parseerror?

Hi,

Why I am getting parseerror when I am not returning anything and I am just INSERTing?

here is the code:

  1. $('#frmSurvey').submit(function (event)
  2. {
  3.     event.preventDefault();
  4.                 
  5.     viewModel.loadPanelVisible(true);

  6.     var formData = new FormData();

  7.     formData.append("customer_name", $("#txtName").dxTextBox('option', 'value'));
  8.     formData.append("customer_email", $("#txtEmail").dxTextBox('option', 'value'));
  9.     // formData.append("customer_birthday", $("#dateBirthday").dxDateBox('option', 'value'));

  10.     $.ajax({
  11.         type: "POST",
  12.         url: 'http://www.meskholdings.com/temp/submit_survey.php',
  13.         data: formData,
  14.         processData: false,
  15.         contentType: false,
  16.     }).done(function ()
  17.     {
  18.         viewModel.loadPanelVisible(false);

  19.         DevExpress.ui.dialog.alert('Thank you for your feedback!', 'Thanks');

  20.         Survey.app.navigate("home");
  21.     }).fail(function (jqXHR, message)
  22.     {
  23.         // $("#txtLoginName").dxTextBox('instance').option('value', '');
  24.         // $("#txtPassword").dxTextBox('instance').option('value', '');

  25.         viewModel.loadPanelVisible(false);

  26.         DevExpress.ui.dialog.alert(message, 'Error');
  27.     })
  28. });



this is my PHP:

  1. <?php
  2.     header("Content-Type: application/json");
  3.   
  4.     if (isset($_SERVER['HTTP_ORIGIN'])) {
  5.         header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
  6.         header('Access-Control-Allow-Credentials: true');
  7.         header('Access-Control-Max-Age: 86400');    // cache for 1 day
  8.     }
  9.         
  10.     $customer_name = $_POST["customer_name"];
  11.     $customer_email = $_POST['customer_email'];
  12.     
  13.     $mysql_host        =    "mysql:host=999.999.999.999;dbname=survey";
  14.     $mysql_user        =    "root";
  15.     $mysql_password    =    "xxxxxxxxx";
  16.     $mysql_options     =    array
  17.                         (
  18.                             PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
  19.                         );
  20.     
  21.     // $mysql_connection;
  22.     $mysql_connection = new PDO($mysql_host, $mysql_user, $mysql_password, $mysql_options);
  23.     $mysql_connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

  24.   $mysql_query = $mysql_connection->prepare('CALL sp_save_customer_survey(:param_customer_name)');
  25.     $mysql_query->bindParam(':param_customer_name', $customer_name, PDO::PARAM_STR);
  26.     
  27.     $mysql_query->execute();
  28. ?>


Thanks,
Jassim