A Flash Developer Resource Site

Page 3 of 5 FirstFirst 12345 LastLast
Results 41 to 60 of 94

Thread: [F8] URGENT: is it possible to tabulate data and email back to me?

  1. #41
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    nooooooooo what if they filled in a form and posted back the data to me...would that work??
    or cud i use php and add it to my flash program?

  2. #42
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    yes that would work. and I'll see what I can do right now about it.

  3. #43
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    any joy??? please say yes!!!

  4. #44
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    I'm about 10 minutes from being done I had to talk to a friend her boyfriend broke up with her.

  5. #45
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    oh no!!! silly boy!!! so close to valentines as well!!! not very nice!!

  6. #46
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    ok I have this working its a php script that writes everything to a text file.......you have to close the webpage or redirect to another page before the text file shows up for the first time after that each new entry will have two blank lines and then the next entry.

  7. #47
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    Quote Originally Posted by calmchess
    ok I have this working its a php script that writes everything to a text file.......you have to close the webpage or redirect to another page before the text file shows up for the first time after that each new entry will have two blank lines and then the next entry.
    thank you thank you thank you!! jus need to see the php script now.. please can you talk it thru with me...to apply it
    thanks
    nb

  8. #48
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    I'll post both scripts then we talk it over

  9. #49
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    cool

  10. #50
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    Flash

    Code:
    function sendFile(){
    sv = new LoadVars();
    sv.sendText1 = msg1.text+newline;
    sv.sendText2 = msg2.text+newline;
    sv.sendText3 = msg3.text+newline;
    sv.SendText4 = score.newline+newline;
    score = "3";
    sv.onLoad = function(){
    out1.text = sv.response;
    };
    sv.sendAndLoad("write.php", sv, "POST");
    };
    
    submit.onRelease = function(){
    sendFile();
    };
    php
    Code:
    <?php
    $text = $_POST['sendText1'].$_POST['sendText2'].$_POST['sendText3'].$_POST['sendText4'];
    $myfile = fopen("pass.txt",'a');
    $fp = fwrite($myfile,$text);
    $fp = fwrite($myfile,chr(13));
    fclose($myfile);
    print "&response=".$text;
    ?>

  11. #51
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    in case you copied the code I just posted ....I had to modify the post so recopy it a second time.

  12. #52
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    wow.....how did you create this?? please can you talk thru it now...what is the difference between the flash and the php ?

  13. #53
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    well flash can't write to a text file but it can pass information to php....and php can write to a text file....hence the need for both php and flash......just name your final result variable to score and remove score="3"; variable from the flash file ...don't mess with the php script there is nothing there you need to modify unless you want to add another variable or something in the future.

  14. #54
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    oh ok...i get it i think...the flash bit goes in the flash section and the php will be created elsewhere right?? :S

  15. #55
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    ah ok...
    so now i have the code where do i add each bit...sorry please be patient...i am newbie

  16. #56
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    the php goes in a seperate text file from the flash....just put it in the same directory as the .swf and you will be good to go.....I repeat php is seperate from the .swf......also to create a php file you rename write.txt to write.php

    I have zipped and uploaded both example files I have created for clarity
    Last edited by calmchess; 02-04-2007 at 05:49 PM.

  17. #57
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    we have a problem ..........I just zipped the incomplete php script file so now I'm uploading the completed one.
    Attached Files Attached Files

  18. #58
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    is postback.zip the correct file now?

  19. #59
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    yes

  20. #60
    Senior Member
    Join Date
    Jan 2007
    Posts
    104
    please can you guide me thru where to add it now.....
    does it all just go on the last slide??
    btw how to add more boxes to add more data....
    also where do they submit to? do i have to fill in my email address?

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