I’m completely stuck here as I’m rubbish at php.
Basically, I’ve got this paypal cart, all is set up and working, but apart from sending the vars to paypal, I also need to email the content of the cart, the info, such as quantities, item names etc…All of this info is stored in arrays, so I need to send those arrays to php, probably format it, although that is the least of my worries now, and email it.
I’m already half blind from staring at google, could someone point me in the right direction please?
You can put these info (formatted ) into a variable then send this variable to php. You have them put in an array right. Just perform a normal function to write the msg yo need to email! use loadVariables() or sendAndLoad(). In php mail them.
i’d use loadVariables() here is an quick example: http://pastie.org/385167
Download the json class form here
In this way you can encode your objects (arrays in this case) to a string and then with the json class for php you will decode back that string to an array and you will be able to access the data as you do in flash…
This is useful to send to php complex data like arrays
Thanks guys, will have a look at that tomorrow
This is handy enough to do;
The specifics of what you want to do after that should be handy enough to integrate.
Let me know if you need any custom AS PHP work done firstname.lastname@example.org
The only drawback of this method is that commas are used as the delimiter, so the Flash string of var,var,var gets sent to PHP it treats it as a String, so if one of your vars was “FOO, BAR ” it would treat it as 2 vars, you can hack up the array and add new delimiter I normally use a pipe ’|’ and change the explode char in the PHP , same principal
Still stuck with this. i haven’t had much time to look into it, and I can’t seem to figure out the php part, so I need to outsource that as I needed that done yesterday really.
So basically, I have a paypal cart system in place. It is using a multi-dimensional array to store the info as the user adds to the cart. The check out is coded and fine, but I also need the info in the cart to be emailed when the “check out” button is clicked.
So the job is: Format that array data into a loadVars, send it to php and explode it or whatever, format it again in some way and email it. (Or whatever method you think is more appropriate)
I will provide the necessary flash file, and I already have a php file used for the contact form, which you may want to build upon.
I’m obviously willing to pay for that and I need it asap, so please send me your quotes directly through my profile, ideally you have dealt with arrays in both flash and php before.