Help with PHP/Flash?
- Started
- Last post
- 13 Responses
- TResudek
Anyone wanna help me figure out how to incorporate a form into a flash file?
The form in question:
http://www.mattbeckley.com/lists…
http://www.mattbeckley.com/lists…I would love to find a way to have a single text box with a "subscibe" and "unsubscribe" button and have it return some sort of message indicated success or failure.
If anyone can help me figure this out I'd really appreciate it and if you need anything from me in return, just ask.
TR
- unfittoprint0
a simple LoadVars object send the info to the php file.
a query to the db will return a value [true/false].
that value is then echoed back to flash.
if you're a beginner, you should grab a php newsletter code and insert an echo command at the end to transmit success/failure.
- welded0
I found it's faster and easier to do the error handling within actionscript as opposed to passing the info onto the PHP script just to find the address doesn't validate, or whatever. Just my 2%.
- mikotondria20
I was wondering, can actionscript do regex ?
Also, isnt there a php-less way to connect to a mysql with a compnent somewhere I think I saw ?
- unfittoprint0
#unfortunately no.
#unfortunately no.
- mikotondria20
on the second point, couldnt you just have a simple db/in/out script server side and pass all the sql from Flash - stick all the sql functions, vars and params in the component ?
Sell it for gold - yeah.
- unfittoprint0
next step, I'm sure.
nowadays, I use PHP mostly to parse db querys as XML for flash.
- mikotondria20
right..
What are the advantages of using XML in most situations, then ?
I generally do like variable pairs and so on. XML sounds a better idea, I know - what are the best reasons, overall ?
- unfittoprint0
XMLis an hierarchical display of information.
You can include different attributes, and easily target specific parts of the structure.
But the most important thing is that it can be translated into a multidimensional arrays [arrays indide arrays inside arrays...]. Imagine you have information in different levels [as folders, subfolders, subfolders...]. You can pass the XML to Flash and parse it eaasily with nested for loops...
- mikotondria20
riiight...I mean is it fairly simple to cobble the xml together with the db in php, then ?
- unfittoprint0
one example:
http://www.kirupa.com/web/mysql_…use the XML object to load it.
- mikotondria20
ooh yeah, thats goood...
- guigrrl0
try this. works well:
http://www.kirupa.com/developer/…