⊗ppPmAuSL 416 of 447 menu

Logging Out of a Session in PHP

An authorized user should have the ability to become unauthorized, that is, to perform a logout from their account. To do this, you need to create a separate page and remove the authorization mark on it, approximately like this:

<?php session_start(); $_SESSION['auth'] = null; ?>

Implement the page logout.php. Upon visiting it, the user should no longer be authorized.

Modify the previous task so that the page logout.php, after executing its code, performs a redirect to index.php. Show a message on that page stating that the user is no longer authorized.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline