Tom Rogers wrote:

store it in the session like:

$_SESSION[session_id()]['dbkey'] = $dbkey;

then get it back with

$dbkey = (isset($_SESSION[session_id()]['dbkey']))? $_SESSION[session_id()]['dbkey'] : 0;

That doesn't negate the problem of people having more than one window open and editing records in each one. The session_id() is going to be the same for each window, so the last window opened will contain the ID and you'll lose the id for the other windows.


The OP could generate a code using uniqid() and store that in a hidden field. Then associate the database id to the unique code generated in the session...

$code = uniqid();
$_SESSION['dbkey'][$code] = $id;

<input type="hidden" name="code" value="<?=$code?>">

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals - www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to