Re: Sessions in PHP... where to start???

From: Date: Mon, 27 Feb 2006 23:44:15 +0000
Subject: Re: Sessions in PHP... where to start???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-231172@lists.php.net to get a copy of this message
Hi everybody! I have a problem and I was told to check out the sessions part in PHP. What I want to deal with is the following : I have a PHP page with a form, where the user writes some data. These data are then written into a file which is then used in a system command as input for an external program (NOTE: The data MUST be written into a file, it cannot be done elsewhise, because the external program takes a file as input). The thing is that I must somehow create a file everytime a user enters data into the form, so I must learn something on sessions I think. My question is, since I don't have a login system or something like that, but just want to create a different file each time (with the session_id being part of it, so that the file is unique), which session commands do I need?
If it were me I'd use tempnam() to create a unique file for that particular user and then use sessions to store the name of that file in the user's cookies... http://us2.php.net/tempnam http://us2.php.net/manual/en/ref.session.php -philip

« previous php.general (#231172) next »