I know as a PHP beginner<\/strong>, Session and Cookies are one of the confusing topics. Because both stores user data. But the differences in both of them are session stored user data in server while cookies<\/a> store user data in the user browser. Session data is only available for the current session while cookie can be stored for a longer period of time.<\/p>\n In this tutorial I am not going to cover cookies but I will cover PHP Session using login and logout example. Let’s have a look on what session do.<\/p>\n\n
session_start()<\/code> function.<\/li>\n
session_destroy()<\/code> function.<\/li>\n<\/ul>\n
\n