Help with php sessions
<p>I like to know how to use a condition on php sessions</p>

<p>in this code if the user is not loged in page will redirect to login.php.  </p>

<pre><code>&lt;?
session_start();
if(!session_is_registered(username)){
header("location: login.php");
}
?&gt; 
</code></pre>

<p>what i want is to redirect user to another php if the user is loged in. if not stay on the same page. like if user is not loged in keep the user in index page and if user is loged in redirect the user to user.php</p>

<p>for the login script im using a code fount in this site :http://www.phpeasystep.com/phptu/6.html</p>

<p>thanks in advance.</p>
