1) So in the users table is a column that holds the file name of the profile image?
again on the login page, edit the authenticate user behavior, on the third step of the wizard, click the plus button and select the profile iamge column to have the file name stored in a session.
then add an image place holder to the home page, and set the source to the path to the image folder and use the session variable value:
<img src="image/path/<?php echo($_SESSION['profileImgSessionName']" />
where profileImgSessionName is the name of the session created by the authenticate user behavior.
2) Updating the name in the database does not change the session value. you would need to add code on the update page to set the session to the new value posted by the update form.
add the following code at line 1 to reset the session:
<?php
if($_SERVER['REQUEST_METHOD'] == "POST") {
if(isset($_SESSION['userName']) && isset($_POST['userName']) && $_SESSION['userName'] != $_POST['userName']) $_SESSION['userName'] = $_POST['userName'];
}
?>
this is assuming the name of the session is "userName" and the name of the form element is "userNmae" you will need to adjust the code accordingly if your session or form element use different names.