Hello forums !!
As we know information can be passed through pages using Query strings, forms, cookies, sessions.
I would like to know how sessions can be used effectively to pass errors between different pages ?
Thanks in advance to all of you.
Passing errors via sessions ??
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Page 1:
Page 2:
Code: Select all
session_start();
$_SESSION['error'] = '42';Code: Select all
session_start();
echo 'Error: ' . $_SESSION['error'];(#10850)
Seems odd to pass errors to another page.. wouldn't you want to show the error on the page it was on?
I guess this could be useful if you're using the post-redirect-get pattern, except it'd be post-redirect-session.
I guess this could be useful if you're using the post-redirect-get pattern, except it'd be post-redirect-session.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
I think its kind of handy. Zend Framework is having such helper...called flashMessenger. yes it is post-redirect-get pattern.scottayy wrote:Seems odd to pass errors to another page.. wouldn't you want to show the error on the page it was on?
I guess this could be useful if you're using the post-redirect-get pattern, except it'd be post-redirect-session.
And on second get message is not there anymore. Haven't look at implementation of flashMessenger.
- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact: