Files
wms-app/app/contact/api/engine/retrieve_contact.php
T

28 lines
598 B
PHP

<?php
session_start();
require '../../../assets/utils/db_auth.php';
$id = (int)$data['id'];
$sql = "SELECT *
FROM md_contact
WHERE
company_id = :company_id and
id = :id ";
$sth = $pdo2->prepare($sql);
$sth->execute([
":company_id" => $company_id,
":id" => $id
]);
db_check($sth, $answer);
$target_dir = $include_url."uploads/contact/";
$answer["contact_dir"] = $target_dir;
$answer["output"] = $sth->fetch(PDO::FETCH_ASSOC);
$answer["success"] = 1;
exit(json_encode($answer));
?>