mds_retrieve_sessdata - Retrieves temporary data for the player.


null mds_retrieve_sessdata(string $holder [, int $index])

Stores temporary data for the player.

Each player can have up to 10 "boxes" of temporary data. This data is unique per player and not shared across script authors.


A string variable that will be populated with the retrieved data.
Index indicates which "box" to store it in, there are 10 boxes numbered 0 to 9. The default is 0.

Return Values

Returns NULL.


  • stored data can be at most 250 chars long
  • it is valid only until the user logs out
  • its much faster and less intensive on the server because it is not using database
  • can be read/set only be the same user that opens the item (it is not shared among users)
  • it is shared across all items edited by the same script author
  • Examples

    example #1

    mds_store_sessdata('bakery', 2);
    mds_retrieve_sessdata(@vd, 2);
    echo 'sessdata slot 2 contains:'.@vd;


    example #2

    @vd = array(
      've' => uv('ve'),
      'vp' => uv('vp'),
      't' => time()
    @va = unserialize(@va);

    See Also

    Community content is available under CC-BY-SA unless otherwise noted.