Choose your team!"; ?>
query($sql) as $row) { if (abs(intval($row["value"])) >= intval($row["max_value"])) { unset($_SESSION["team"]); $_SESSION["finished"] = true; } } if (isset($_POST['pull'])) { if ($_SESSION["team"] == "plus") { print "You pulled for team plus (green)..."; $sql = "UPDATE clouds SET value=value+1 WHERE cloud_id = " . $_GET['cloud_id']; $result = $pdo->query($sql); } if ($_SESSION["team"] == "minus") { print "You pulled for team minus (blue)..."; $sql = "UPDATE clouds SET value=value-1 WHERE cloud_id = " . $_GET['cloud_id']; $result = $pdo->query($sql); } } $sql = "SELECT * FROM clouds WHERE cloud_id = " . $_GET['cloud_id']; foreach ($pdo->query($sql) as $row) { print "