• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Menu sessions

#1
[eluser]Jesse2303[/eluser]
Hi all
My login works again, and I've made 2 sessions, you can see below.
When I log in with my login. Everything works fine but only the menu won't update. What I'm doing wrong ?

O, the autoload.php , I added sessions too to the array.

Code:
$this->session->set_userdata('login', '1');
            $this->session->set_userdata('gebruiker', $_POST['name']);



Code:
<?php
        if(isset($_SESSION['gebruiker'])){
    ?>
            admin     <?=anchor('dashboard', 'dashboard');?> begin
                  - <?=anchor('login', 'uitloggen');?>  
            modules <?=anchor('pics', 'afbeeldingen');?>  
                  - <?=anchor('nieuws', 'nieuws');?>
    <?php
        }
            else
        {
    ?>
        gast  <?=anchor('main/index', 'begin');?>
            - &lt;?=anchor('main/login', 'login');?&gt;</a>
            - &lt;?=anchor('main/contact', 'contact', '');?&gt;</a>
    &lt;?php
        }
    ?&gt;

#2
[eluser]Yash[/eluser]
Code:
$login = $this->session->userdata('login');




&lt;?php

    if($login==1)    //change here

{

    ?&gt;
            admin     &lt;?=anchor('dashboard', 'dashboard');?&gt; begin
                  - &lt;?=anchor('login', 'uitloggen');?&gt;  
            modules &lt;?=anchor('pics', 'afbeeldingen');?&gt;  
                  - &lt;?=anchor('nieuws', 'nieuws');?&gt;
    &lt;?php
        }
            else
        {
    ?&gt;
        gast  &lt;?=anchor('main/index', 'begin');?&gt;
            - &lt;?=anchor('main/login', 'login');?&gt;</a>
            - &lt;?=anchor('main/contact', 'contact', '');?&gt;</a>
    &lt;?php
        }
    ?&gt;

Hope it works fine Smile

#3
[eluser]Jesse2303[/eluser]
[quote author="Yash" date="1214320790"]
Code:
$login = $this->session->userdata('login');




&lt;?php

    if($login==1)    //change here

{

    ?&gt;
            admin     &lt;?=anchor('dashboard', 'dashboard');?&gt; begin
                  - &lt;?=anchor('login', 'uitloggen');?&gt;  
            modules &lt;?=anchor('pics', 'afbeeldingen');?&gt;  
                  - &lt;?=anchor('nieuws', 'nieuws');?&gt;
    &lt;?php
        }
            else
        {
    ?&gt;
        gast  &lt;?=anchor('main/index', 'begin');?&gt;
            - &lt;?=anchor('main/login', 'login');?&gt;</a>
            - &lt;?=anchor('main/contact', 'contact', '');?&gt;</a>
    &lt;?php
        }
    ?&gt;

Hope it works fine Smile[/quote]

Hello

Thanks.

I try to fix this with your code thanks Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.