session is not woking in my login script
<p>session is not woking in my login script. What is wrong with this code. When I echo  $_SESSION['userid'] in same file, it shows the userid. But when I echo that another file, there is no any response.</p>

<pre><code>&lt;?php
session_start();
include '../../classes/check.class.php';
include '../../classes/user.class.php';

$check = new Check();
$user = new User();

$email = $_REQUEST['txtEmail'];
$password = $_REQUEST['txtPassword'];

$userid = $check-&gt;validateUser($email, $password);

if($userid){
    $_SESSION['userid'] = $userid;
    $url = '../../index.php';
    header("Location: $url");
}else{
    header("Location: $url");
}
</code></pre>
