| Server IP : 64.202.187.69 / Your IP : 216.73.216.192 Web Server : Apache System : Linux 69.187.202.64.host.secureserver.net 3.10.0-1160.144.1.el7.tuxcare.els6.x86_64 #1 SMP Fri May 29 16:22:24 UTC 2026 x86_64 User : transmarket ( 1001) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/transmarket/translator/controllers/ |
Upload File : |
<?php
include 'connection.php';
$sql = 'select * from tbl_translators where id = ' . $_SESSION['tm_id'];
$result = $mysqli->query($sql);
$salt = '';
if($result->num_rows > 0) {
while ($row = $result->fetch_object()) {
$salt = $row->salt;
}
}
$sqlUpdate = 'UPDATE `tbl_translators` SET name = "' . addslashes($_SESSION['tm_name']) . '"';
if(isset($_POST['phone']) && $_POST['phone'] != '') {
$_SESSION['tm_phone'] = trim($_POST['phone']);
$sqlUpdate .= ', phone = "' . addslashes($_POST['phone']) . '"';
}
if(isset($_POST['country_id']) && $_POST['country_id'] > 0) {
$country = explode('_', trim($_POST['country_id']));
$country_id = $country[0];
$_SESSION['tm_country_id'] = $country_id;
$_SESSION['tm_country_name'] = $country[1];
$sqlUpdate .= ', country_id = "' . $country_id . '"';
}
$sqlUpdate .= ' WHERE id = ' . $_SESSION['tm_id'];
$resultUpdate = $mysqli->query($sqlUpdate);
$data['status'] = 200;
$data['message'] = 'Saved successfully';
echo json_encode($data);