Files
sam-kd/bendingfee/ajax_getGuiderailData.php

20 lines
755 B
PHP
Raw Normal View History

<?php
// ajax_getProductData.php
require_once($_SERVER['DOCUMENT_ROOT'] . "/guiderail/fun_guiderail.php");
// POST로 전달받은 값 (없으면 기본값 설정)
$model_name = $_POST['model_name'] ?? '';
$finishing_type = $_POST['finishing_type'] ?? '';
$rail_length = isset($_POST['rail_length']) ? floatval($_POST['rail_length']) : 0;
$rail_width = isset($_POST['rail_width']) ? floatval($_POST['rail_width']) : 0;
$check_type = $_POST['check_type'] ?? '벽면형';
// getProductData 함수 호출하여 데이터 배열 생성
$productData = getProductData($model_name, $finishing_type, $rail_length, $rail_width, $check_type);
// JSON 형식으로 반환
header('Content-Type: application/json');
echo json_encode($productData);
exit;
?>