1. CSS
  2. Flash
  3. HTML
  4. Illustrator
  5. Java
  6. JavaScript
  7. Maya
  8. Photography
  9. Photoshop
  10. PHP
  11. Ruby
  12. Ruby on Rails
  13. 3ds Max

PHP: how to: PHP Sessions

  1. Clicks today:
    0
  2. Clicks this month:
    0
  3. Overall rating:
    2.33/5

PHP » Basics — over 12 years ago
Learn what sessions are and how to create, retrieve and delete sessions in PHP

Comments

avatarellisgl over 12 years ago

Ok - this is the super basic way of setting a session, but here's a more secure way. I have even more secure session stuff for login stuff that deals with salts.

session_start(); // Start the session

// Simple protection of session attacks. if(!isset($SESSION['secured'])) { session_regenerate_id(); $SESSION['secured'] = 1; }

Your Comment

You must be logged in to post a comment.