Sessions variable unseen in multiple pages
<p>I don't understand the thing with sessions in php. It says that after you start a session, the session variable are stored and can be seen in multiple pages.But in my pages that are not seen. For example I have my index.php page where I start the session_start(). Then I click a button to login and if everything is ok it should redirect me to profile.php page where I print the session email. But it doesn't recognize my session variable.My code:</p>

<pre><code>if($_POST['actiune'] == 'login'){

$email = $_POST['email'];
$_SESSION['username'] = $email;
$password = $_POST['password'];
$pass = getPassword($email);
$verify = password_verify($password, $pass);
    if ($verify) {
        header("Location: index.php?page=profile");
    }
    else {
        header("Location: index.php?page=login&amp;msg=PleaseRegister");
    }
}
</code></pre>

<p>profile.php</p>

<pre><code>echo $_SESSION['username'] ; die();
</code></pre>

<p>Any help? </p>

<p>UPDATE:</p>

<p>profile.php</p>

<pre><code> &lt;?php
 session_start();
 echo $_SESSION['username'] ; 

 ?&gt;
 &lt;div id="profile"&gt;

&lt;p id="welcome"&gt;Welcome :&lt;?php echo $_SESSION['username']; ?&gt;&lt;/p&gt;
&lt;?php
    if ($_SESSION['avatar'] == ""){
        ?&gt;
        &lt;img src = "http://placehold.it/400x200/0000ff/&amp;text=Upload a picture" alt =""/&gt; 
        &lt;?php
    }
    else if ($_SESSION['avatar'] != ""){
        ?&gt;
        &lt;img src="avatars/&lt;?php echo $user['file'];?&gt;"&gt;
        &lt;?php   
    }
?&gt;

&lt;p id="modifyPf"&gt;&lt;a href="index.php?page=update"&gt; Modify&lt;/a&gt;&lt;/p&gt;
&lt;p id="reset"&gt;&lt;a href="index.php?page=resetPassword"&gt; Reset password&lt;/a&gt;&lt;/p&gt;
&lt;p id="articlePf"&gt;&lt;a href="index.php?page=allArticles"&gt; Article page&lt;/a&gt;&lt;/p&gt;

&lt;form action="action.scripts.php" method="POST" enctype="multipart/form-data"&gt;
    &lt;input type="hidden" name="actiune" value="avatar"&gt;
    &lt;input type="hidden" name="id" value="&lt;?php echo $user['id'];?&gt;"&gt;
    &lt;p&gt;&lt;label for="avatar"&gt;Upload an avatar:&lt;/label&gt;&lt;/p&gt;
    &lt;p&gt;&lt;input type="file" name="avatar" id="fileToUpload"&gt;&lt;/p&gt;
    &lt;p&gt;&lt;input id ="button" class="btn btn-primary" type="submit" name="button" value="Send"/&gt;&lt;/p&gt;

&lt;/form&gt;
</code></pre>

<p></p>