Browse Source

Add renew session cookie on page load

master
Skylar Ittner 2 years ago
parent
commit
bae6d1ac17
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      required.php

+ 2
- 0
required.php View File

@@ -14,6 +14,8 @@ $session_length = 60 * 60; // 1 hour
14 14
 session_set_cookie_params($session_length, "/", null, false, true);
15 15
 
16 16
 session_start(); // stick some cookies in it
17
+// renew session cookie
18
+setcookie(session_name(), session_id(), time() + $session_length);
17 19
 //
18 20
 // Composer
19 21
 require __DIR__ . '/vendor/autoload.php';

Loading…
Cancel
Save