May 12, 2015

How To Destroying OR Unset Session in PHP?

When you used multiple session with different name and If you want any one session destroy OR unset then used following syntax:

<?php
session_start();
unset($_SESSION['session_name']);
?>

And If you want destroy all session name and data after success process then used following syntax:

<?php
session_start();
session_destroy();
?>

Enjoy!

No comments:

Post a Comment

The Future of Technology: Emerging Trends to Watch in 2025

Introduction As we navigate through 2025, the technological landscape continues to evolve at an unprecedented pace. Innovations that once se...