Файловый менеджер - Редактировать - /home/gqdcvggs/.trash/associate_club.php
Назад
<?php header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); require_once 'config.php'; $conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); if ($conn->connect_error) { echo json_encode(['success' => false, 'error' => 'Database connection failed']); exit; } $data = json_decode(file_get_contents('php://input'), true); $groupId = intval($data['groupId']); $clubId = intval($data['clubId']); $sql = "UPDATE groups_table SET club_id = $clubId WHERE id = $groupId"; if ($conn->query($sql) === TRUE) { echo json_encode(['success' => true]); } else { echo json_encode(['success' => false, 'error' => $conn->error]); } $conn->close(); ?>
| ver. 1.6 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка