How do I show a user's credit based on their session
- by Jamie
Hi all - I'm developing a simple LAMP app where users can credit their account using Paypal. I suspect this is a simple issue, but have spent quite a while experimenting to no avail and would appreciate any thoughts:
System has a user management system working fine using sessions, but I can't get it to display the current user's credit.
But I've been trying things along the lines of:
  $result = mysql_query("
  SELECT *
  FROM users
  INNER JOIN account
  ON account.UserID=account.UserID
  ORDER BY account.accountID");
  
  while($_SESSION['Username'] = $row['Username'] )
  {
  echo $row['Username'];
  echo $row['Credit'];
  }
I suspect the while statement is invalid, but I want it to echo username and credit where the current session username = the username stored in the database.
Thanks so much for taking a look - very much appreciated.