我有代码:
$query = dbConnect()->prepare("SELECT * FROM players");
$query->execute();
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
echo 'Slapyvardis: '. $row['Vardas'] . '<br>Pinigai: '.$row['Pinigai'] . '<br>Patirtis: '.$row['XP'];
}
我需要通过用户名显示该信息:
$query->bindParam(":Vardas", $_POST["Vardas"]);
或$_SESSION["vardas"] = $row["vardas"];
我该怎么做?