$data = mysql_query('SELECT * FROM authentication WHERE id='.$_SESSION['username'])
is prob. wrong - try:
$username = $_SESSION['username'];
$data = mysql_query("SELECT * FROM authentication WHERE id='$username' LIMIT 1");
The LIMIT 1 just stops searching after the first (should only be one) user is found, so should be quicker (methinks).
Ensure that the session var actually exists. I can't see a session_start(); anywhere. This needs to be right at the top of your file.
diafol
Keep Smiling
10,675 posts since Oct 2006
Reputation Points: 1,632
Solved Threads: 1,514
Skill Endorsements: 57
What have you done?
Where is the '-'?
If you carry on being so vague, contributors will not help you.
diafol
Keep Smiling
10,675 posts since Oct 2006
Reputation Points: 1,632
Solved Threads: 1,514
Skill Endorsements: 57