Advertisement
Guest User

Untitled

a guest
Dec 27th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public function setSession($row) {
  2. $_SESSION['session'] = [
  3. 'id' => $row['id'],
  4. 'username' => $row['username'],
  5. 'email' => $row['email'],
  6. 'level' => $row['level']
  7. ];
  8. //set cookie
  9. $hashcode = md5(uniqid(rand(), TRUE));
  10. setcookie("shpre", $hashcode, time()+3600 * 24 * 365);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement