A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Passing variables to PHP from Flash

  1. #1
    if you go first
    Join Date
    Oct 2005
    Location
    Herts, UK
    Posts
    62

    Passing variables to PHP from Flash

    Hey guys,

    If anyone could help with this, I'd be very happy!

    I have my Flash5 movie embedded in the index.html page in:
    http://www.dar.cam.ac.uk/mayball/smrtj/
    (swf file location http://www.dar.cam.ac.uk/mayball/smrtj/smrtj.swf)

    On each page after the intro, I have an "admin" button. (Note there is also an "admin" button on the intro page, but this doesn't yet have any AS).

    On each page, which is actually a scene in my swf, the variable current is set to the name of the current page, juniors, say. The "admin" buttons have the following AS:

    on (release) {
    page = current;
    getURL ("form.php", "admin", "GET");
    }


    So that brings up a new window (called "admin") and, from the juniors page, loads:
    dar.cam.ac.uk/mayball/smrtj/current=juniors&page=juniors
    into it.

    The problem is, the PHP doesn't get the variables! The URL is in the address bar as shown here, but "Here, page should be: $page" doesn't show anything for the $page variable!

    Can anyone clear this up for me???

    Thanks a lot,
    Chris

  2. #2
    if you go first
    Join Date
    Oct 2005
    Location
    Herts, UK
    Posts
    62

    Sorry - sorted

    Sorry!

    I'm a moron!

    I had the login form being echoed out of a function - and forgot to add in global $page;

    D'Oh!

    Chris
    ps - hope this all serves to help someone who has struggled to do this

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