I Got A Problem Here And Seem I Got Some Fix For The Code
The Problem Here
http://www.daniweb.com/web-development/php/threads/403345
But I Need To Know Something
This Code Work Ok
<?
if(isset($_SESSION['username']))
{
$query = ("SELECT * FROM users WHERE password='$_SESSION[password]'");
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
echo "Welcome<br/>";
echo "Your Username : $row[username]<br/>";
echo "Your Password Is : $_SESSION[password]<br/>";
echo "Your Email : $row[email]<br/>";
echo "Member ID : $row[id]";
}
}else{
echo "<img src='Zimg/Login.Png' alt='Login' /><br/><br/>";
echo "Reg Plz";
echo "<META HTTP-EQUIV='refresh' CONTENT='2; URL=index.php'>";
}
?>
And When I Change
("SELECT * FROM users WHERE password='$_SESSION[password]'")
To
("SELECT * FROM users WHERE username='$_SESSION[username]'")
It Dont Show Anything
Why The Password Show And Work
But The Username Dont Show Anything ?