prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$_SESSION['user_id']]); $user = $stmt->fetch(); $status = $user['kyc_status'] ?? 0; $message = ''; $error = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST' && $status != 1 && $status != 2) { $name = $_POST['kyc_name'] ?? ''; $id_number = $_POST['kyc_id_number'] ?? ''; // Simple file handling for prototype $upload_dir = 'uploads/kyc/'; if (!is_dir($upload_dir)) mkdir($upload_dir, 0777, true); $front = ''; $back = ''; $handheld = ''; if (isset($_FILES['front']) && $_FILES['front']['error'] === 0) { $front = $upload_dir . time() . '_front_' . $_FILES['front']['name']; move_uploaded_file($_FILES['front']['tmp_name'], $front); } if (isset($_FILES['back']) && $_FILES['back']['error'] === 0) { $back = $upload_dir . time() . '_back_' . $_FILES['back']['name']; move_uploaded_file($_FILES['back']['tmp_name'], $back); } if (isset($_FILES['handheld']) && $_FILES['handheld']['error'] === 0) { $handheld = $upload_dir . time() . '_handheld_' . $_FILES['handheld']['name']; move_uploaded_file($_FILES['handheld']['tmp_name'], $handheld); } $stmt = $db->prepare("UPDATE users SET kyc_name = ?, kyc_id_number = ?, kyc_id_front = ?, kyc_id_back = ?, kyc_id_handheld = ?, kyc_status = 1 WHERE id = ?"); if ($stmt->execute([$name, $id_number, $front, $back, $handheld, $_SESSION['user_id']])) { $status = 1; $message = "KYC documents submitted successfully! Our team will review them shortly."; } else { $error = "Failed to submit KYC documents. Please try again."; } } $status_labels = [ 0 => ['text' => 'Unverified', 'color' => '#888', 'icon' => 'fa-user-slash'], 1 => ['text' => 'Under Review', 'color' => '#f0b90b', 'icon' => 'fa-clock'], 2 => ['text' => 'Verified', 'color' => 'var(--success-color)', 'icon' => 'fa-check-circle'], 3 => ['text' => 'Rejected', 'color' => 'var(--danger-color)', 'icon' => 'fa-times-circle'], ]; $current = $status_labels[$status]; ?>
Profile

Identity Verification

Status:

Upload Photo
Upload Photo
Upload handheld photo with date

Your identity documents have been received and are currently being reviewed. This process usually takes 1-2 business days. We will notify you once the review is complete.

You can still trade while waiting for verification.

Congratulations! Your identity has been fully verified.

You now have full access to all withdrawal limits and advanced trading features.