TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-18-2008, 10:44 AM   #21 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

You can create a cookie for that. It's kinda like a shoppingcart if you want to put it that way.

When you leave the order page, you wish to reset the entire order? Use the PHP setcoockie() function and set it on a timeout of approx. 5 minutes. What you can do as well, is set a $_SESSION['timestamp'] and fill it with the time(). Then the time is above 180 seconds or so (+= operator), you kill the entire session using session_destroy() or unset() the $_SESSION array.

(I'm going offline (11.48GTM+1), I'll be online tonight again)
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
The Following User Says Thank You to ReSpawN For This Useful Post:
bmathers (02-18-2008)
Old 02-18-2008, 02:25 PM   #22 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

In my opinion, the best way to deal with it is to give the user a 'save me' option, and delete / destroy the session data by default. Basically the reverse of what ReSpawN is suggesting. If the options are stored as elements in an array, and the user chooses the 'save me' option, use serialize() and save the serialized array somewhere (SQLite / MySQL / text / cookie) linked against the session_id value.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
Old 02-18-2008, 02:32 PM   #23 (permalink)
The Contributor
 
Join Date: Jan 2008
Posts: 28
Thanks: 9
bmathers is on a distinguished road
Default

Quote:
Originally Posted by SOCK View Post
In my opinion, the best way to deal with it is to give the user a 'save me' option, and delete / destroy the session data by default. Basically the reverse of what ReSpawN is suggesting. If the options are stored as elements in an array, and the user chooses the 'save me' option, use serialize() and save the serialized array somewhere (SQLite / MySQL / text / cookie) linked against the session_id value.
Im not too bothered about trying to save the data, as its just a reference tool. They arent actually buying anything.

Is there not a way when the tailormade.php page opens (or the session starts) it wipes all of the data that has been previously put into the system?
bmathers is offline  
Reply With Quote
Old 02-18-2008, 03:51 PM   #24 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

Quote:
Originally Posted by bmathers View Post
Is there not a way when the tailormade.php page opens (or the session starts) it wipes all of the data that has been previously put into the system?
Well, the problem with that is, if the script is using sessions to store state from page to page, and you kill that on each page request, it's a moot point.

Honestly, the application is a bit messy and could use a go-over to clean it up and fix this (and potentially other) problems. If you can't get ahold of the original coder, let someone here have a go at the contract.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
The Following User Says Thank You to SOCK For This Useful Post:
bmathers (02-18-2008)
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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


All times are GMT. The time now is 07:28 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design