PHP- pages that contain session variables must be linked?
<p>i have a php snippet saying: if this session variable is this, change the header location to this.</p>

<p>the session variables arent working, however.</p>

<p>must the pages be linked?</p>

<pre><code>$query = mysql_query("SELECT * FROM `username` WHERE `password` = '$pword' AND `username` = '$uname'");
$exsists = 0;

    WHILE($rows = mysql_fetch_array($query)){
     $exsists = 1;
     break;
     }
        if ($exsists){
        $_SESSION['usern23']=$uname;
        $_SESSION['logged']=1;
        header('Location: logged2.php');

                }
</code></pre>

<p>$_SESSION['usern'] wont show up on logged2.php</p>
