I'm new in php. I recently go through one login example in php (http://net.tutsplus.com/articles/news/build-a-login-and-registration-system-with-xml/) and implemented login page for my test site in local host.
But now i want to assing each user one image let say i have 3 user and i have 3 user xml under user folder and each xml should look something like this
<?xml version="1.0"?>
<user>
<password>some password will come here</password>
<email>[email protected]</email>
<img>images/mynewimage.jpg</img>
</user>
i added <img> node in xml but i don't know how to call that on php page. Here the biggest challenge is for me is to find out the current user on each page since i have 3-4 basic pages after login and i'm maintain his login on each page so i want his image also on all the page i given below code on each page to maintain session
<?php
session_start();
if(!file_exists('users/' . $_SESSION['username'] . '.xml')){
header('Location: login.php');
die;
}
?>
when i check with username <?php echo ucfirst($_SESSION['username']); ?> it shows me current user name but in same way i'm unable to call image next to username.