what is the use of session_start() and session_destroy() functions in php?

Report
Question
851 views

The session_start() function is used to start a new session.

Please explain why do you think this question should be reported?

Report Cancel

The session_start() function is used to start a new session. Also, it can resume an existing session if it is stopped. In this particular case, the return will be the current session if resumed.

Syntax:

session_start();

The session_destroy() function is used to destroy all of the session variables as given below:

<?php
session_start();
session_destroy();
?>
PHP

Thread Reply

Leave an comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>