Php sessions rename issue
<p>i have this simple question please.</p>

<p>I have this part of code which sets my session:</p>

<pre><code>if($count==1){
        // Register $myusername, $mypassword and redirect to file "admin.php"
        session_register("admin");
        session_register("password");
        $_SESSION['name']= $myusername;
        header("location:index.php");
    }
</code></pre>

<p>And this is what i put in every file to protect it :</p>

<pre><code>&lt;?php
session_start(); //Start the session
define(ADMIN,$_SESSION['name']); //Get the user name from the previously registered super global variable
if(isset($_SESSION['admin'])){//If session not registered
header("location:login.php"); // Redirect to login.php page
}
else //Continue to current page
header( 'Content-Type: text/html; charset=utf-8' );
?&gt;
</code></pre>

<p>I need to change the session name because i already have one like this.</p>

<p>Thanks</p>
