File: /home/imensosw/public_html/imenso.co/demo/resume-maker/ajax-update-tracking.php
<?php
require('include/initalizedb.php');
session_start();
$user_id = $_SESSION['session_id'];
$response['type'] = 'success';
$response['session'] = $_SESSION;
$response['data'] = $_POST;
$dataArray = array(
'track' => $_POST['checkVal']
);
$where = array(
'id' => $_SESSION['session_id']
);
$result = $db->update("users", $dataArray, $where);
// print json_encode($result);
if($result) {
$response['type'] = 'success';
$response['message'] = 'Tracking updated';
} else {
$response['type'] = 'Failed';
$response['message'] = 'Tracking updated';
}
print json_encode($response);