This content has been marked as final. Show 5 replies
I don't know all of what's required on the php side.
But (if I recall correctly) the results are in the sequence array.
so you need to have a new LoadVars to send that data, as string values.
//send To PHP code:
var emailResultsUploader:LoadVars = new LoadVars();
var confirmEmail_LV:LoadVars=new LoadVars();
//send the sequence contents separated by semicolons (or whatever you want)
emailResultsUploader.sequence = sequence.join(";");
emailResultsUploader.sendAndLoad(" http://www.depthwork.com/cards/Flash/cardmail.php3", confirmEmail_LV, "POST");
I'm am not PHP savvy either, But I have 2 recommendations. This may not fix any other errors that are there, but these parts should be changed.:
$EmailBody = $_POST['sequence'];
and to give a response, add in before the last ?>
Looks like clbeech has an example of the php side of things (I didn't look at it, but it sounded relevant)
I downloaded the files from the link and get an unexpected file format error when I try to opne the fla file..........ARG.
Are you using Flash MX? this is a Flash8 file, I can publish down for you, if needed.
GWD is right, you need to use the LoadVars class to send the variables, to a PHP email output. However I see some problems in your system concept here, your attempting to send Arrays within an Object to the php, that will make getting the values out of the $_POST[ ] difficult. this is why GWD has suggested converting this to a string.
Also, when are you trying to initiate the sending of the email? if this happened every time the user clicks a button you'd get a thousand emails all the time, each with only one element or something. I would suggest re-thinking the way this works. like maybe, if all the other cards have been selected(?i dunno), on the last selection this initiates the send sequence? You may have already been doing this, but I didn't see it in the code.
Lastly, and it's none of my business really, but what are you wanting to keep this information for? The reason I ask is, that you've already used it within the 'test' to determine the output in the final evaluation, so I can only assume that you're wanting to track the demographics of people using the 'test' (btw - according to the test, I'm suppose to be helpful :) I'm thinking that you would still need to then go through the emails and gather the info 'by hand' so to speak. If this is the case, it could be much more efficient to store the info in an online database, on a per user basis, also the time tracking info can be tracked within a DB column automatically. The same mechanisms can be used to send the info using LoadVars, but the PHP would be different and enter the info into the DB for you. You can also then download the contents of the DB at anytime into a spreadsheet program like Excel to view and analyze. You can also view it online, or build an app to do so.
I also noticed that your sending 'decoder', when that would include all of the information in each property. I'm assuming that you would want to be getting the information from the 'sequence' array, which I also am assuming is where you are storing the choices by pushing the array by the cards being selected by the user. So I'm thinking that since you know what the information means, that you may only need to send the sequence of selected, rather than all of the text itself. Like a series: circle, sprial, triangle, square, cross ... then the next, and so on. Just a thought :) You could even then build a 'decoder' application that you could input the sequence and view the results if needed. You could even store the sequence by index number, like the above would be: 14320 or 1,4,3,2,0
OK anyway I hope this gets you thinking about how you can reduce your problem of dealing with so many variables, and how to store them or send them. let us know what you think, and then I will help you get the info to PHP.
I would like one email with all the clicks...I would like the answers to go to a database but....this is already waaaaaaaaaaaay over my head. We only want the answers so that if the person wants a longer reading and to go into their lives and where they are at in more detail that we already have the information to start with. They may even have questions about it. Having the database was going to be in the future if this thing really gets going.
I was not aware I would have this problem trying to get this part. I feel I should recreate this in HTML or some other programming, except I have got it this far. Is it possible to recreate with less problems???
Thanks all very much for your help,