I am new to learning Php. I have created the following code.
<?php /* * Testing Sessions with PHP */ session_start(); $_SESSION['user_id'] = 'Testing User'; session_destroy(); ?> <html> <head> <title> Sessions Page</title> </head> <body> <?php echo $_SESSION['user_id']; ?> </body> </html>
Now the echo $_SESSION['user_id'] echos testing user. In my opinion it should not, as i have destroyed the session. what is the reason?