Session creation with php
<p>I have a problem , </p>

<p>I have a log in page that check user login and when a user has logged successfully , I start a new session :</p>

<pre><code>$loggedIn = new loggedIn();
                    $loggedIn-&gt;email = $userdetails["email"];
                    $loggedIn-&gt;displayname = $userdetails["display_name"];
                    $loggedIn-&gt;username = $userdetails["user_name"];


                                        var_dump($loggedIn-&gt;username);

                    //Update last sign in
                                        session_start();
                    $_SESSION["user"] = $loggedIn;

                                        $kk =  $_SESSION["user"];
                                        var_dump($kk-&gt;username);
</code></pre>

<p>it shows succsessul session creation , but when I go to other page or move back to this page , I have no session  : </p>

<pre><code>isset($_SESSION["user"])
</code></pre>

<p>why ?</p>
