Archive:PHP and MySQL Programming/Session Handling: Difference between revisions

wikademia>Ralfe
No edit summary
 
wikademia>Wikademia
 
(16 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==
 
{{?}}
HTML and PHP are "stateless" languages. Meaning that they are incapable of retaining a state between pages. To get around this serious limitation, we use Sessions. With sessions, session variables are stored in a file on the web server and so are acessible accross multiple pages.
HTML and PHP are "stateless" languages. Meaning that they are incapable of retaining a state between pages. To get around this serious limitation, we use Sessions. With sessions, session variables are stored in a file on the web server and so are accessible across multiple pages.


== Starting a Session ==
== Starting a Session ==
Line 49: Line 48:
  ?>
  ?>


Note that we first need to start the session before we destory it. This is because the session_destroy() function destroys the currently active session.
Note that we first need to start the session before we destroy it. This is because the session_destroy() function destroys the currently active session.
 
[[../Database Connectivity/|Previous: Database Connectivity]] | [[../|TOC]] | [[../Command Line Programming/|Next: Command-Line Programming]]
 
[[Category:PHP and MySQL Programming|{{SUBPAGENAME}}]]