prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$user_id]); $user = $stmt->fetch(); if (!$user) { header('Location: login.php'); exit; } $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; if ($user['role'] !== 'founder') { header('Location: funding_rounds.php'); exit; } // Fetch Trending Startups based on total funding raised $stmt = db()->prepare(" SELECT id FROM startups ORDER BY funding_raised DESC LIMIT 10 "); $stmt->execute(); $trendingIds = $stmt->fetchAll(PDO::FETCH_COLUMN); $stmt = db()->prepare(" SELECT s.*, fr.funding_goal as active_goal, fr.funding_raised as active_raised, fr.status as round_status FROM startups s LEFT JOIN funding_rounds fr ON s.id = fr.startup_id AND fr.status = 'Active' WHERE s.founder_id = ? ORDER BY s.created_at DESC "); $stmt->execute([$user_id]); $myStartups = $stmt->fetchAll(); ?> My Startups — <?= htmlspecialchars($platformName) ?>
<?= htmlspecialchars($platformName) ?> Logo
Log Out

My Startups

Manage and track your ventures.

List New Startup

No startups found

Start your journey by listing your first startup or idea.

Start Funding Round
0 && ($raised / ($goal ?: 1)) * 100 < 1) ? 1 : round(($raised / ($goal ?: 1)) * 100); $isTrending = in_array($startup['id'], $trendingIds); ?>

...

£ Raised %
View Details