Download process.php from Presidor1/STC_APP: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/spaces/Presidor1/STC_APP/resolve/main/process.php
- Command line
-
hf download hf://spaces/Presidor1/STC_APP/process.php
-
curl -L -o process.php https://huggingface.co/spaces/Presidor1/STC_APP/resolve/main/process.php
552 Bytes
| if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
| $id = $_POST['id']; | |
| $action = $_POST['action']; | |
| $status = ($action === 'approve') ? 'Approved' : 'Rejected'; | |
| $conn = new mysqli("localhost", "root", "", "stc_db"); | |
| if ($conn->connect_error) die("Connection failed: " . $conn->connect_error); | |
| $stmt = $conn->prepare("UPDATE applications SET status=? WHERE id=?"); | |
| $stmt->bind_param("si", $status, $id); | |
| $stmt->execute(); | |
| $stmt->close(); | |
| $conn->close(); | |
| header("Location: dashboard.php"); | |
| exit(); | |
| } | |