Jump to content

Function: Mds_Retrieve_Sessdata


Recommended Posts

[b]void[/b] mds_retrieve_sessdata(variable $holder, [i]optional[/i] int $index);

[b]Parameters[/b]
Holder is a variable that will be given the stored value.
Index indicates which session box to retrieve from. There are 10 boxes, numbered 0 to 9. The default is 0.

See the related function [url="http://magicduel.invisionzone.com/topic/7583-function-mds-store-sessdata"]mds_store_sessdata()[/url].
If you have stored a serialized value, you will need to unserialize it after retrieving.

Example 1:
[code]
mds_store_sessdata('bakery', 2);
mds_retrieve_sessdata(@vd, 2);
//@vd now has 'bakery'
[/code]

Example 2:
Unserializing
[code]
@vd = array(
've' => uv('ve'),
'vp' => uv('vp'),
't' => time()
);

mds_store_sessdata(serialize(@vd));
mds_retrieve_sessdata(@va);
@va = unserialize(@va);
[/code]

Edited by Rendril
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Forum Statistics

    16,239
    Total Topics
    176,935
    Total Posts
  • Recently Browsing

    No registered users viewing this page.

  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...