Файловый менеджер - Редактировать - /home/d46091/invoice.ecogenix.in/get_item_description.php
Назад
<?php require_once('includes/connection.php'); header('Content-Type: application/json'); $response = []; if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['item_name'])) { $item_name = trim($_POST['item_name']); $stmt = $conn->prepare("SELECT `hsn`, `cgst`, `sgst`, `igst`, `description` FROM `item_master` WHERE `item_name` = ?"); if ($stmt) { $stmt->bind_param("s", $item_name); $stmt->execute(); $stmt->bind_result($hsn, $cgst, $sgst, $igst, $description); if ($stmt->fetch()) { // echo '<pre>'; // print_r($hsn); // die(); $response = [ 'hsn' => htmlspecialchars($hsn), 'cgst' => htmlspecialchars($cgst), 'sgst' => htmlspecialchars($sgst), 'igst' => htmlspecialchars($igst), 'description' => htmlspecialchars($description) ]; } else { $response = ['error' => 'Item not found.']; } $stmt->close(); } else { $response = ['error' => 'Failed to prepare statement.']; } } else { $response = ['error' => 'Invalid request.']; } echo json_encode($response);
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка