PDA

View Full Version : PHP SQL - concurrent sessions



IBeMMoran
February 19th, 2009, 01:58 AM
Hi all,

Question:

I want to set up a Flash file running on a website that connects to a backend DB for data retrieval using PHP. Easy enough. However, all I can find are basic tutorials using all the db code every time in every php file. I want to set this up on a website for concurrent usage. So I want to use PHP classes with ongoing sessions and db connections so every time my flash file / AS tries to call db functions I dont have to reconnect to the db and reselect my table and records to update. I also want to keep almost all of the code in the backend only using AS / Flash to pass values and display for user interaction.

What is the best way to accomplish something like this or is it even possible? Can they handle persistent connections/sessions?

Thanks,

Michael G Moran.

binime
February 20th, 2009, 12:20 PM
Hi. I did something like this with one of my projects, what i found was i had to use FlashVars

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16417

loading up the session and user id into the SWF/flash file then when loading php using loadVars sending the session and user id to the php page.

http://www.permadi.com/tutorial/flashVars/index.html

IBeMMoran
February 20th, 2009, 02:27 PM
Thanks for the help.

I think I'm going to use Flash Remoting with AMFPHP.