Hi All,
I have managed to connect to my database in flash using php. I need to be able to add records to the database using a flash interface.
Can anyone help?
Here is my existing code:
stop();
Security.allowDomain("*", "localhost:8888");
var dives_xml_url:String = "http://localhost:8888/pembrokeshire_diving/generate_wrecks_xml.php";
var dives:XML = new XML();
var dives_url:URLRequest = new URLRequest(dives_xml_url);
var divesLoader:URLLoader = new URLLoader(dives_url);
divesLoader.addEventListener(Event.COMPLETE, divesLoaded);
function divesLoaded(e:Event):void
{
dives = XML(divesLoader.data);
dives = XML(divesLoader.data);
var il:XMLList = dives.wrecks;
shipname_txt.text = il.ship.text();
depth_txt.text = il.dep.text();
locate_txt.text = il.loc.text();
}
Obviously I will also need to add buttons and text fields to facilitate adding the data but I wanted to know if it was possible first.
I am using PHP and MySQL with MAMP.
Any help would be really appreciated.
Thank you
Gale