problem with session

Lukket Opslået 3 år siden Betalt ved levering
Lukket Betalt ved levering

I have 3 user level .: Admin, staff and user in my header I have this session which prevents if you do not have the right userlevel then you can not access the page. and if the user is inactive for 30 minutes he will be logged out - but it not work correct

<?php

session_start();

//cek apakah user sudah login

if(!isset($_SESSION['username'])){

die("Du er ikke logget ind - Luk browseren og Log ind igen");//jika belum login jangan lanjut

}

//cek level user

if($_SESSION['level']!="user"){

die("Du er ikke logget ind - Luk browseren og Log ind igen");//jika belum login jangan lanjut

}

if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) {

// last request was more than 30 minutes ago

session_unset(); // unset $_SESSION variable for the run-time

session_destroy(); // destroy session data in storage

}

$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp

?>

but it not work correkt

PHP MySQL HTML Software Arkitektur

Projekt ID: #25760651

Om projektet

17 bud Remote projekt Aktiv 3 år siden

17 freelancere byder i gennemsnit $26 timen for dette job

usuf001

Hi there I can troubleshoot and fix the issue. Please let me know if we can discuss this further. Thank you

$35 USD på 1 dag
(627 bedømmelser)
7.6
starttechno

send me access to site. I just need 15 mins to fix this... Please award job and send me access to site so I can fix bug..

$25 USD på 1 dag
(113 bedømmelser)
6.6
rockingrik

I can help you with it right away. I am pro with PHP, Laravel, WordPress, Magento, HTML5 and other related technologies. Why me? I only take one job at a time and work on same till its delivery. I believe in pro acti Flere

$30 USD in 30 dage
(67 bedømmelser)
6.4
TeamDPS

hi sir I am interested in your project. want to provide my best for your task. myself 6 year experienced developer. my aim is only to satisfied emoyer with quality. you can check my reviews for assurance. please ping m Flere

$30 USD in 2 dage
(153 bedømmelser)
6.1
spryox

Hi, Have checked the issue may be some glitch interacting with server in setting up session. I need to check the issue on the portal itself. So please share me the link along with sample login credentials so I can che Flere

$30 USD in 2 dage
(171 bedømmelser)
6.5
kchoudhary95

Greetings! My name is Kamlesh Kumar and I am a full-stack web developer. I believe my skills match for your project. I have a good grasp of working with PHP. I see your job description. I am ready for start working rig Flere

$30 USD in 2 dage
(87 bedømmelser)
5.7
medycms

Hi there... as on project description I saw 2 points : #1| have this session which prevents if you do not have the right userlevel then you can not access the page. #2 | and if the user is inactive for 30 minutes he wi Flere

$25 USD på 1 dag
(14 bedømmelser)
4.5
anoirwork

Hi there, With more than 5 years experience with Web development i'm interested in your project i wrote this proposal to propose to you my services as web developer and Wordpress experienced freelancer. Looking forwar Flere

$30 USD på 1 dag
(35 bedømmelser)
4.3
developerrishi

Hello sir i can resolve your PHP session problem i have 5 year experience in website development. i can start work now. and complete asap. you can check my reviews i had already done these type of work. Thank s Rishi

$30 USD in 2 dage
(27 bedømmelser)
3.9
MostafElkady

Hi, I suggest printing the values for $_SESSION array and that may give a clue to the cause of the problem. I will be happy to help if you still need more help. Best regards, Mostafa

$20 USD på 1 dag
(10 bedømmelser)
3.5
jayachaudhary19

Hi sir i have 5 years experience in php webdevelopment. i can fix this issue in 2 hours. if you find me fit for this job please let me know.

$30 USD på 1 dag
(1 bedømmelse)
0.8
atifzaidyk152148

hi i am more than 5 year of experience in PHP i will do that for you just in 2 hours regards atif ZAidy

$10 USD på 1 dag
(0 bedømmelser)
0.0
mohitsinghrathor

Hi Employer. This is a very simple problem, not to worry. I have 3year experience in Web development & i can solve this ASAP, Please i am new to freelancer but give me a chance to complete your work within time & qua Flere

$19 USD på 1 dag
(0 bedømmelser)
0.0
iGhalia

Good day, Already worked with similar case and have code for session that loads page according to user type and logout once inactive for certain time..

$15 USD på 1 dag
(0 bedømmelser)
0.0