Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Initialise session variable when user leaves the web site
Old 05-02-2009, 07:17 AM Initialise session variable when user leaves the web site
Novice Talker

Posts: 10
Trades: 0
I had a problem for intialisation of session variable ...

the problem descibed was as follow

"Suppose I book an order at rainola.com and confirm it.

I then go to some other website.

After that I revisit rainola.com and click on “send order”
button on top horizontal bar.

I can see details of my previous order in
order table."

Please suggest me solution for this

Last edited by chrishirst; 07-10-2010 at 02:26 PM..
vikaspa is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-02-2009, 06:06 PM Re: Initialise session variable when user leaves the web site
Extreme Talker

Posts: 189
Trades: 0
You could use cookies as well as session variables, whenever the session gets updated update the cookies, and if now session variables and yes cookies, update the session variables with whats in the cookies.
simster is offline
Reply With Quote
View Public Profile
 
Old 05-02-2009, 06:25 PM Re: Initialise session variable when user leaves the web site
Average Talker

Posts: 28
Name: Amit Soni
Trades: 0
assuming that the objective required is "user should not see the same order upon returning to the ordering website"....

Solution =
1) Identify landing page.
2) Reset session if its a landing page.

Now...
how do you know if its a landing page...
1) Check PHP_referer
.....a) str replace http:// with ''(blank)
.....b) str_replace www. with ''(blank)
.....c) match domain with current domain
2) If match then..nothing...else reset session...destroy > recreate.
__________________
--Amit

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

amitsoni is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Initialise session variable when user leaves the web site
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.39810 seconds with 12 queries