prepare("SELECT COUNT(*) FROM clients WHERE client_id = ?"); $stmt->execute([$clientId]); if ($stmt->fetchColumn() > 0) { $errors[] = "Client ID already exists."; } else { // Insert into database $stmt = $pdo->prepare("INSERT INTO clients (client_id, name, status) VALUES (?, ?, ?)"); if ($stmt->execute([$clientId, $clientName, $status])) { log_audit_event('client_create', $_SESSION['user_id'], 'client', $clientId); header("Location: dashboard.php?status=client_added"); exit; } else { $errors[] = "Failed to create the client. Please try again."; } } } } ?> Add New Client - FlexPass

Add New Client

Back to Client List
A unique 4-digit identifier for the client.