A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: $_Session PHP Help needed

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Location
    U.K
    Posts
    23

    Question $_Session PHP Help needed

    Hello.

    I have a flash movie embeded into the php page. This movie sends the variable Bookresult to PHP. So far this works fine. But each time it sends it, it overwrites itself.

    I want to use $_Session to temporarily store the contents of BookResult so that the next time flash posts BookResult again I can add it to the string of the original. eg.

    Flash 1st Send

    Bookresult = Great Expectations
    $_Session[1] = Great Expectations

    Flash 2nd Send

    Bookresult = Oliver Twist
    $_Session[1] = Great Expectations
    $_Session[2] = Oliver Twist

    ...and so on.

    How can I do this?

    Many Thanks

    Bottlebank

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    you could try

    Code:
    session_start();
    if(!isset($_SESSION['books'])) $_SESSION['books'] = array();
    $_SESSION['books'][] = $your_new_value;
    Didn't you look for some permanent way to store the data the other day?

    Musicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center