tags:

views:

85

answers:

2

Hi i have used the code from http://www.switchonthecode.com/tutorials/sending-flex-data-to-php-using-xml#comment-3635 to send xml data to php...

I don't know y i am having problem acessing data in php. Can anyone tell me how to see if the data has arrived at the php.

Thanks

A: 

http://www.switchonthecode.com/tutorials/sending-flex-data-to-php-using-xml says:

We are going to do this using a simple HTTPService which will send our XML data as a GET variable to a PHP script

You might want to start there: Does the get parameter contain the expected data

echo '<pre>Debug: GET[contact]=',
  htmlentities( print_r($_GET['contact'], true) ),
  '</pre>';

Also set the error_reporting level to E_ALL and maybe display_errors to on. You can do that either within the script

error_reporting(E_ALL);
ini_set('display_errors', 1);

or in the php.ini (if this is your development machine).

VolkerK
A: 

make a log function and use it in your php code

functino logit($input) {
     $handle = fopen(dirname(__FILE__) . '\__log.txt', "a");
     fwrite($handle, var_export($input, true) . "\n");
 }

so, everytime you get a request from flex, do logit($_GET); or whatever you want to log. If the input is an array, it will explode it as var_dump does and write it to the file

TheBrain