views:

76

answers:

4

How can I establish connection of a Flash site with a database(i.e. MYSQLetc)?

A: 

I had to do this for a college project I did before and you can easily do it with the URLLoader and URLVariables functions by stocking up your variables and sending them to a page or recieving the variables and then taking them out of the URLVariables function.

However if you were to be passing arrays or dynamically chosen variables then you would need to pass all of your data as a comma seperated string and then parse through it on the other side and vice versa.

I'll try to post some actual code when I get home but I hope this helped

Haziba
Thanks haziba....If you post me the related code that would be more helpful
Vibhakar SInha
A: 

You cannot connect to a database server directly from flash. To communicate with the database you need a webservice.

Adrian Pirvulescu
I need webservice when i need to connect the site to worldwide but within my system i can make such connectivity using databases such as MySQL.
Vibhakar SInha
You did not specified you want this to work only on local machine. Why you need that at all ??? Anyway you could use socket connection to connect to MySql. http://www.devx.com/webdev/Article/30638
Adrian Pirvulescu
A: 

If you need to pass the Data from Flash to Database , for example Registration information , then follow the Tutorial

I assume you have knwoledge of Server Side Scripting like PHP or C#

Subhen
Thanks Suben..........this will be beneficial for me.
Vibhakar SInha
@Vibhakar SInha, Let me know if you face any difficulties. Try Posting the Code snippet where you face any error , exception or Problem
Subhen
A: 

There is a project called assql that connects Flash directly to the database but is aimed at AIR projects. AMFPHP is good for using php to save to the database from AS3.

knuckfubuck