:( 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?
:( 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?
yes that would work. and I'll see what I can do right now about it.
any joy??? please say yes!!!
I'm about 10 minutes from being done I had to talk to a friend her boyfriend broke up with her.
oh no!!! silly boy!!! so close to valentines as well!!! not very nice!!
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 itQuote:
Originally Posted by calmchess
thanks
nb
I'll post both scripts then we talk it over
cool :thumbsup:
Flash
phpCode: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();
};
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;
?>
in case you copied the code I just posted ....I had to modify the post so recopy it a second time.
wow.....how did you create this?? please can you talk thru it now...what is the difference between the flash and the php ?
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.
oh ok...i get it i think...the flash bit goes in the flash section and the php will be created elsewhere right?? :S
ah ok...
so now i have the code where do i add each bit...sorry please be patient...i am newbie
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
we have a problem ..........I just zipped the incomplete php script file so now I'm uploading the completed one.
is postback.zip the correct file now?
yes
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?