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

wikademia>Wikademia
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Programming:PHP and MySQL|TOC]]
== 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 accessible across 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.


Line 52: Line 50:
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.
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]]


[[Programming:PHP and MySQL:Database Connectivity|<< 4. Database Connectivity]] | [[Programming:PHP and MySQL|TOC]] | [[Programming:PHP and MySQL:Command Line Programming|>> 6. Command Line Programming]]
[[Category:PHP and MySQL Programming|{{SUBPAGENAME}}]]