
problem with session
$10-30 USD
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
Projekt ID: #25760651
Om projektet
17 freelancere byder i gennemsnit $26 timen for dette job
Hi there I can troubleshoot and fix the issue. Please let me know if we can discuss this further. Thank you
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..
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
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
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
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
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.
hi i am more than 5 year of experience in PHP i will do that for you just in 2 hours regards atif ZAidy
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
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..