#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    UK
    Posts
    2
    Rep Power
    0

    MySql Data Extraction into Flash without a txt file?


    Hi guys :

    Heres the situation. I have a page (call it name.php) that lists profiles for users that have registered on the site. It scrolls through a database and displays the data as a table.

    The name of the user also acts as a link to another php file (call it profile.php) that sends the name ie :



    PHP:--------------------------------------------------------------------------------
    <a href='profile.php?name=$name'>

    --------------------------------------------------------------------------------


    When this is passed to profile.php it pulls down all the data and formats it so that flash can read it as strings. Now the problem that is causing me to go bald(!). The flash movie sits on another page (call it flashname.htm) and this uses :


    PHP:--------------------------------------------------------------------------------
    loadVariablesNum ("profile.php", 0, "GET");

    --------------------------------------------------------------------------------


    There are a number of dynamic text fields that are then populated with the data that the flash movie pulls down. I was hoping that the profile.php page could format the data and then insert the data into hidden text fields so that when the php has been processed, it just redirects to the flash movie. However this doesn't work as the flash movie calls the profile.php page and not the other way around. If I use the hidden text fields with profile.php, the data that flash calls is incorrect as it not only displays the php variable, but it also displays the html code for the hidden text field it resides in as well.

    The only way my tiny brain can think of to resolve this problem is to to get name.php to pass the name variable directly to flashname.htm, which in turn passes the the variable to profile.php and then flashname.htm calls profile.php for the data. But I don't know how to achieve this.

    I can't seem to find a way to resolve this issue. Any help appreciated!
  2. #2
  3. macho member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    207
    Rep Power
    13
    Hi, I'm thinking you should use PHP sessions to pass the username around. And then use $HTTP_SESSION_VARS["name"] to get the value and pass it to flash.

    Also, very simple solution to your problem, the processed data you want to pass back to PHP? the ones in hidden text fields? just put in flash - i mean either place the text fields outside of main viewable area or hide it under something, you know ...

    so, either user clicks on something to submit the data for processing? or after flash movie finish playing then process data, its the same.

    flash gets data from whichever source, user or DB then, process it, pass it back to PHP along with hidden preset fields.

    where to pass new processed data?

    instead of outputing to a HTML file(?) the new file can actually be the same flash swf(!!) or well ... just output results into a results.php file so that this new php file can get the data that you passed it via flash just now (post ot get), process the data and output the data to back to the browser.

    know what i mean?

    chill! =)

    PS: I hope its helpful

IMN logo majestic logo threadwatch logo seochat tools logo