prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$user_id]); $user = $stmt->fetch(); if (!$user) { header('Location: login.php'); exit; } if ($user['role'] !== 'investor') { header('Location: dashboard.php'); exit; } $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; $stmt = db()->prepare(" SELECT i.*, s.name as startup_name, s.description as startup_desc FROM investments i JOIN startups s ON i.startup_id = s.id WHERE i.investor_id = ? ORDER BY i.created_at DESC "); $stmt->execute([$user_id]); $myInvestments = $stmt->fetchAll(); $totalInvested = 0; foreach ($myInvestments as $inv) { if ($inv['status'] === 'approved' || $inv['status'] === 'completed') { $totalInvested += $inv['amount']; } } ?> Investment Portfolio — <?= htmlspecialchars($platformName) ?>
<?= htmlspecialchars($platformName) ?> Logo
£
Log Out

Investment Portfolio

Manage your stakes and track your repayments.

Total Principal
£
Startups

No investments yet

Start your journey by backing the next generation of founders.

Go to Discovery Hub
0 ? ceil($remainingAmount / $monthlyDiv) : 0; $status = ($inv['status'] === 'completed') ? 'Completed' : 'Active'; $statusColor = ($inv['status'] === 'completed') ? '#4cd964' : '#00f2ff'; if ($inv['status'] === 'pending') { $status = 'Pending'; $statusColor = '#ffcc00'; } elseif ($inv['status'] === 'rejected') { $status = 'Rejected'; $statusColor = '#ff3b30'; } ?>

Invested on
Status
Invested
£
Interest Rate
%
Total Return
£
Monthly Div
£
Term
Months
Remaining Payouts
Next Payment