prepare("UPDATE users SET gameLevel = 2 WHERE id = :id"); $stmt->bindParam(':id', $userId, PDO::PARAM_INT); $stmt->execute(); // Redirect to a success page header("Location: level2_complete.php"); exit(); } catch (PDOException $e) { // In a real app, log this error instead of displaying it die("Database error: " . $e->getMessage()); } ?>