PDA

View Full Version : database back ends


stiej
04-29-2002, 01:48 PM
there are many questions concerning how to export variales and import them. From browsing through the forum, both this one and the others and other web sites' forums, I am aware (as well as from experience) that yo can use getURL and loadVariables.

However, my question is, can Flash access, interogatea dn save to a databse DIRECTLY? And how?

My movie save to a database by launching a asp page and passes to the asp page page the variables using getURL and get method.

My movie also loads from the database by extracting the required fields using a HTML/ASP page, concatenating them into a single string correctly interspersed with &s and them saves this into a ASP-created text file. I then called the html page with the flash swf movie in it manually by using a window.location = "mymovie.html" - a simple redirection.

It woudl be easier if I could ismply acces the DB directly. Can I? If not how would everyone here acccess a Database. I don;t know PHP/CGI, only VBScript, Javascript and ASP etc.

Thanks for your time reading....

jimburton
04-29-2002, 06:08 PM
You can't talk to the back end with flash - you need a layer of server-side code which, like you say, could be php, asp, cgi, whatever. Which one you use depends on what's implemented on your server and what your preference is.

php - it's free, very fast, easy on server resources, developed directly for server-side web scripting unlike something like asp which is different technologies cobbled together. Loads of resources available for learning it... Oh, and you don't need to lie down with the evil empire.

stiej
04-29-2002, 06:35 PM
thanks for your reply. I visited the macromedia site and they too say themselves that flash only uses middleware to commubicate with databases (don't know about mx).

My problem was that i couldn't refresh the swf file, the pc always took the cached copy. However I learned from the macromedia site that u can append a question mark and some "dumb" data to the url. I knew this, but i was implementing it in the html file that was calling the swf.

Anway, all sorted now. Thanks for your comments, will consider learning PHP - what does it require in terms of software, server setup etc? where do i get the things from, how/where do i start?

Thanks..

Steven Jones

jimburton
04-29-2002, 07:46 PM
I think you can run php as a service on just about any web server but it's most often used with apache and was developed with that in mind, so if you're starting from scratch or setting up locally go to

www.apache.org

www.php.net

php will talk to any old dbms but you may like to look at...

www.mysql.com just to keep the opensource theme going.

there are a few useful tutorials available on using these three together, from installation upwards, at http://hotwired.lycos.com/webmonkey/00/44/index4a.html

bingo! holy trinity of dynamic web stuff and flash will be flying.