Session Variables and AMFPHP – taterboy
September 3rd, 2008 | Filed under: AMFPHP, Flash, Flex, Tips

In normal uses PHP and other server/scripting languages are able to store variables for later usage. Due to the fact that the these pages are not actually living in a browser, remoting is one of the exceptions where variables do not live between calls. We have to plan out our Flash to PHP conversations as if PHP has very short term memory and include all the needed data to complete every transaction. For instance, if you have to store information in a database using a userID, even though you have just recieved that userID from php, your next php call will have to include the userID because PHP just can not remember.

Here is a demo of using PHP session variables to temporarily store and read data. Even though normal variables vanish, session information is live and well.
Read More »

Technorati Tags: , , , , , , ,

| 1 Comment »