Breaking News
yeni film izle hd film seyret film izle

Destroying a Session

As earlier you have read that by default PHP sessions are automatically deleted when users quit their browser, because the PHPSESSID cookie ’ s expires field is set to zero. However, sometimes a user might want to destroy a session immediately.

For example, if a shopper has checked out and placed an order via your online store, a user might empty his shopping cart by destroying his session.

To destroy a session, a user can simply call the built – in session_destroy() function:

session_destroy();

Check Also

Copying, Renaming, and Deleting Files

PHP also allows you to copy, rename, and delete files. The functions to perform these …