Ok. I'm am missing something! After searching the support forum at PHPBuilder, Macromedia, and MySQL I still can't get my Flash program to retrieve data from a PHP request.
When my FLASH program uses this line
getURL ("localhost/myPHP_Prorgam", 0, "POST");
myPHP_Program connects to the database and returns a NEW html document with the results. So I know that my PHP program is ok when I use 'echo "$myData";' or 'Print "$myData";'
Here's the problem...
When I change the FLASH program to use
loadVariables ("localhost/myPHP_Prorgam", 0, "POST");
to read a string of arguments into FLASH from the myPHP reply it doesn't work.
Now I read that there is a delay between the PHP request and that flash keep working without waiting for the reply. So I inserted
onClipEvent(load) {
loadVariables ("localhost/myPHP_Prorgam", 0, "POST");
}
onClipEvent(data) {
//waiting for the reply
gotoAndPlay("continue");
}
But my Flash program just hangs and PHP sends no data to the database. So I figure myPHP is now the problem.
Is this right so far? I also read that I need the to use
urlencode($myData);
What does this do? and how do I use it?
Im really confused now!
When my FLASH program uses this line
getURL ("localhost/myPHP_Prorgam", 0, "POST");
myPHP_Program connects to the database and returns a NEW html document with the results. So I know that my PHP program is ok when I use 'echo "$myData";' or 'Print "$myData";'
Here's the problem...
When I change the FLASH program to use
loadVariables ("localhost/myPHP_Prorgam", 0, "POST");
to read a string of arguments into FLASH from the myPHP reply it doesn't work.
Now I read that there is a delay between the PHP request and that flash keep working without waiting for the reply. So I inserted
onClipEvent(load) {
loadVariables ("localhost/myPHP_Prorgam", 0, "POST");
}
onClipEvent(data) {
//waiting for the reply
gotoAndPlay("continue");
}
But my Flash program just hangs and PHP sends no data to the database. So I figure myPHP is now the problem.
Is this right so far? I also read that I need the to use
urlencode($myData);
What does this do? and how do I use it?
Im really confused now!