unable to set $_SESSION variable with PHP variable
<p>Here is where I am setting my session variables.</p>

<pre><code>function validateUser()
{
session_regenerate_id (); //this is a security measure
$_SESSION['user'] = $_POST['username'];
$_SESSION['valid'] = 1;
$_SESSION['firstname'] = $firstname;
$_SESSION['lastname'] = $lastname;
}
</code></pre>

<p>This is what print_r ($_SESSSION) echos.</p>

<pre><code>Array ( [user] =&gt; aboshart [valid] =&gt; 1 [firstname] =&gt; [lastname] =&gt; )
</code></pre>

<p>If I echo $firstname and $lastname I get the proper values. What am I doing wrong?</p>
