hello iam have some trouble in my page code
this is the profile page code i started the session in the first row of page
and this is the code that have a problem
<?
if ($_SESSION['username'] || $_SESSION['password'])
{
$query = "SELECT * FROM users WHERE username='$_SESSION[username]'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
echo "$row[username]";
}
}else{
echo "<img src='Zimg/Login.Png' alt='Login' /><br/><br/>";
echo "You Must Login To See This Page :(";
echo "<META HTTP-EQUIV='refresh' CONTENT='2; URL=index.php'>";
}
?>
When I Login I Cant See The Username Why ?
Why This Code Is Not Working ?
$query = "SELECT * FROM users WHERE username='$_SESSION[username]'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
echo "$row[username]";
}