i tried to make some changes for my page. So,i want to show for users a specific coins what are in the table.(Table are created) But,when i try to doing this didn't work(didn't show) if i want for the username. Work only without verification for user id/name.
My code:
$strSQL = "SELECT * FROM users WHERE id=" . $_GET["id"];
$rs = mysql_query($strSQL);
while($row = mysql_fetch_array($rs)) {
echo "<dt>Coins:</dt><dd>" . $row["coins"] . "</dd>";
}
I tried to $_GET["id"]
with ["username"]
.But also didn't work (Verification for session is like this: if(isset($_SESSION['username']))
Somebody know why didn't work?
$strSQL = "SELECT * FROM users WHERE id='".$_GET['id']."'";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.