11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.it-ebooks.info• CONTENTSManaging the Session Storage Media.................................................................................................. 369Setting the Session Files Path.............................................................................................................. 369Automatically Enabling Sessions.......................................................................................................... 370Setting the Session Name .................................................................................................................... 370Choosing Cookies or URL Rewriting ..................................................................................................... 370Automating URL Rewriting ................................................................................................................... 370Setting the Session Cookie Lifetime..................................................................................................... 370Setting the Session Cookie’s Valid URL Path........................................................................................ 371Setting Caching Directions for Session-Enabled Pages ....................................................................... 371Working with Sessions ..................................................................................................373Starting a Session ................................................................................................................................ 373Destroying a Session............................................................................................................................ 373Setting and Retrieving the Session ID .................................................................................................. 374Creating and Deleting Session Variables.............................................................................................. 374Encoding and Decoding Session Data .................................................................................................. 375Practical Session-Handling Examples ...........................................................................377Automatically Logging In Returning Users ........................................................................................... 378Generating a Recently Viewed Document Index................................................................................... 379Creating Custom Session Handlers ...............................................................................381Tying Custom Session Functions into <strong>PHP</strong>’s Logic............................................................................... 382Using Custom <strong>MySQL</strong>-Based Session Handlers ................................................................................... 382Summary .......................................................................................................................385• Chapter 19: Templating with Smarty..................................................................387What’s a Templating Engine? ........................................................................................387Introducing Smarty ........................................................................................................389Installing Smarty............................................................................................................390Using Smarty .................................................................................................................391Smarty’s Presentational Logic.......................................................................................393xvii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!