clear all php sessions by clicking on link -


by clicking on link on page.php want clear php sessions on index.php:

<a href="index.php">back</a> 

could tell me how this? thank much

<a href="index.php?clearsession=true">back</a> 

php on top of page:

<?php   if($_get['clearsession']){     session_start();             session_unset();     session_destroy();     session_write_close(); } 

Comments