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') { $totalInvested += $inv['amount']; } } ?> Investment Portfolio — <?= htmlspecialchars($platformName) ?>
<?= htmlspecialchars($platformName) ?> Logo
Log Out

Investment Portfolio

Manage your stakes in student-led startups.

Total Invested
£
Startups

No investments yet

Start building your portfolio by discovering promising startups.

Discover Startups
Invested on

...

Amount
£
Status
Details