A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Okay now my data is stored in SQL how do I get it back into FLASH

  1. #1
    Senior Member
    Join Date
    Oct 2003
    Posts
    102

    Okay now my data is stored in SQL how do I get it back into FLASH

    I am not that great at database stuff but I was able to make a form send the info to a php page and into an MySQL database. Now is there an easy way to import my data back in Flash and view it?

    Its just like first name, last name, e-mail address stuff nothing complicated. Maybe Flash has a nice component that will make an easy to use note card system for each row of data. Or maybe flash has a dynamic table thingie for my data.

    Any idea's on this?
    Mark Gooodman
    www.markcgoodman.com

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

    before you look into tables and stuff, try this

    a movie with text fields (varname firstname, email, etc)
    and a button that loads variables from a php script

    the php script:
    <?
    include "dbstuff.php"; // same as your save script
    $result = mysql_query("select firstname, lastname, email from cards limit 1");
    $row = mysql_fetch_array($result);
    print "&firstname={$row['firstname']}&lastname={$row['lastname']}&email={$row['email']}&";
    ?>

    Musicman

  3. #3
    Senior Member
    Join Date
    Oct 2003
    Posts
    102

    Okay I think I get this but. . .

    Thanks for the php code.
    So we are limiting the results to one row of data at a time - right?
    row = one row of data from first name on.

    So now how can we
    1. get a total number of rows. (how many people entered information)
    2. have flash display the data. (again we need some sort of dynamic table or something)
    3. It would be really nice to let people download an excel file of the data - like a report.

    Any idea's?
    Mark Gooodman
    www.markcgoodman.com

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    one row at a time means you dont have to worry about display - and can still play with features such as select on search criteria

    There is no problem to loop over all rows, and also no big problem in creating a download file ... but you may have to teach visitors that a csv file also is excel

    Musicman

  5. #5
    Tech Designs CEO CNL83's Avatar
    Join Date
    Jun 2000
    Posts
    997
    What is the code in Flash for the text fields to pull from that php script?
    UPS' official RIPP-OFF
    See full complaint here > www.actionfx.net/complaint.htm

  6. #6
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    if you want to make life easy, just use loadvriables in the same timeline where you have the text fields, and give them variable names email etc.

    loadVariables('script.php', _root);

    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