[HELP] /me.php Avatar not changing

JayC

Always Learning
Aug 8, 2013
5,504
1,401
thats normal, it will update when u clear your cache or log out of your acc and back in.
He's wanting to make it not store in the session. So please disread this dumb comment, no offense but I am guessing you don't know how this actually works.

Alright so in your class where your session is defined on the login it grabs your iinformation, one of this being your look. So on your me page you are using $_SESSION['user']['look'] or {figure}. Here is a simple solution, put this at the top of your page and replace in your me page where it says {figure} with the 2nd code
Code:
<?php
if($_SESSION['user']['id']){
$getLook = mysql_fetch_assoc(mysql_query("SELECT `look` FROM `users` WHERE `id` = '".$_SESSION['user']['id']."' LIMIT 1"));
}else{
header('Location: yourURL/index');
exit;
}
?>

Code:
<?php echo $getLook['look']; ?>
 

Users who are viewing this thread

Top