News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Suresh Ariya:
Implement Flash Messages using Session in PHP (Part 1 & 2)
February 06, 2014 @ 11:08:55

In a two part series on his site Suresh Ariya shows you how to implement "flash messages" in your applications (in a framework-agnostic way) with the help of a custom script and the current user's session.

As part of the post series, today we are going to see how we can implement Flash Messages using PHP Session. Before proceeding into that, first i like to explain what is Flash Message and its usage. [...] Flash message is a message that will be shown/displayed only once. if you reload the browser or navigated to other pages and came back, you won't see the same message displayed again.

In part one he introduces the concepts behind flash messaging and gets into the initial steps of the implementation via a "FlashMessageInterface" to define the structure. In part two he gets into the actual implementation and shares a script that uses a custom prefix to define the messages and the expected getter/setter methods as well as "clear" functionality.

0 comments voice your opinion now!
flash message series part1 part2 implementation interface

Link: http://sureshdotariya.blogspot.in/2013/12/implement-flash-messages-using-session.html

blog comments powered by Disqus

Similar Posts

Matthew Weier O'Phinney: Deployment with Zend Server (Part 2 of 8)

ProDevTips.com: Zend Amf and class mapping with Flash CS3 / AS3

NetTuts.com: Refactoring Legacy Code: Part 6 - Attacking Complex Methods

Pixelstech.com: Should we use Abstract class or Interface?

Matthew Weier O'Phinney: Deployment with Zend Server (Part 1 of 8)


Community Events





Don't see your event here?
Let us know!


series podcast configure language extension version api voicesoftheelephpant opinion unittest release install introduction symfony conference composer list laravel community interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework