Session value set in one file, can't read in other
<p>I create a session-variable for passing error messages from my mail.php file to the file that called it.</p>

<pre><code>session_start();
if(something) {
    $_SESSION['error'] = "something went wrong";
}
</code></pre>

<p>I try to read it in the file that called mail.php:</p>

<pre><code>if(!empty($_SESSION['error'])) {
    echo $_SESSION['error'];
} else {
    echo "Email sent!";
}
</code></pre>

<p>But it's not working. I call session_start() at the top of the page at both files.</p>

<p>A var_dump gives this:</p>

<pre><code>array(1) { ["error"]=&gt; string(41) "Not all fields are filled in." } ­
</code></pre>
