why's that no data showing on my sidebar,even if it's on my admin or user side? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: why's that no data showing on my sidebar,even if it's on my admin or user side? (/showthread.php?tid=72248) |
why's that no data showing on my sidebar,even if it's on my admin or user side? - J.A - 11-26-2018 this is the picture of my sidebar: this is my code in my sidebar: Code: <aside class="main-sidebar"> then this is my code in my login: Code: $this->form_validation->set_rules('username', 'Username', 'trim|required'); RE: why's that no data showing on my sidebar,even if it's on my admin or user side? - Pertti - 11-27-2018 Check your $this->session->type value - it looks like it has no fallback (which might be by design), so if it's not either 'admin' or 'user', it will never show anything. RE: why's that no data showing on my sidebar,even if it's on my admin or user side? - soneax - 11-27-2018 Maybe i'm wrong but perhaps you're not saving the type in the user session and then you're looking for something that don't exist - nothing to show. RE: why's that no data showing on my sidebar,even if it's on my admin or user side? - InsiteFX - 11-28-2018 You can make your base_url look better by doing this: PHP Code: <a href="<?php echo base_url('product');?>"> And for your redirects like so: PHP Code: redirect(base_url('profile')); If your missing css file it will stop your sidebar from showing. Because it has happened to me before. RE: why's that no data showing on my sidebar,even if it's on my admin or user side? - dave friend - 11-28-2018 (11-28-2018, 02:09 PM)InsiteFX Wrote: And for your redirects like so: The base_url( ...) part of the above is unnecessary. redirect() will figure out the "base" for you. It should look like this. PHP Code: redirect('profile'); |