Welcome Guest, Not a member yet? Register   Sign In
Getting session status
#1

(This post was last modified: 03-27-2021, 02:35 AM by Hope.)

Hello there

I'm not familiar with Codeigniter and i have bought script that is made using this. However i wanted to create pages in another language.

structure currently is

example.com
example.com/es
example.com/fr

i just created subfolder to root and i have url structure as above working. But i'm unable to access sessions or is used logged in. I haven't ever used any frameworks so i really don't understand how this works. I have been reading docs about sessions and i don't know if i would need to check user status with cookies, $_SESSION or some db query.

Below is code from theme folder where i took view and header data for my language pages. There is this check with session('uid') that i cannot access from subfolders i created on root

Code:
<?php if (!session('uid')) {  ?>
    <a href="auth/login>">Login</a>
    <a href="auth/signup">Sign up</a>
    <?php }; ?>

<?php }else{?>
    <a href="Dashboard" >Dashboard</a>
<?php }?>


Seems so simple. If not session uid then show login and signup links and if session uid is created show dashboard link. What would i need to do to just get that session uid?

edit: Fixed code area
Reply


Messages In This Thread
Getting session status - by Hope - 03-26-2021, 12:11 PM
RE: Getting session status - by Hope - 03-29-2021, 11:01 AM
RE: Getting session status - by Hope - 04-01-2021, 10:25 PM
RE: Getting session status - by InsiteFX - 04-02-2021, 02:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB