# Retreiving Variables from PHP using AS3

**URL:** https://forum.kirupa.com/t/retreiving-variables-from-php-using-as3/318571
**Category:** flash
**Created:** [January 24, 2011, 12:40pm UTC](https://forum.kirupa.com/t/retreiving-variables-from-php-using-as3/318571 "2011-01-24T12:40:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![L\_Smith](https://avatars.discourse-cdn.com/v4/letter/l/bcef8e/32.png) [@L\_Smith](https://forum.kirupa.com/u/L_Smith)
#### Post date: [January 24, 2011, 12:40pm UTC](https://forum.kirupa.com/t/retreiving-variables-from-php-using-as3/318571/1 "2011-01-24T12:40:53Z")

</div>

(I wonder how many users you guys who’s first post is a “help me” thread? It must be a lot.)  
What I’m trying to do is simply test how to load array variables from a mySQL database using PHP and Flash.  
(I don’t know much about PHP and mySQL, that’s being handled by another person for the project I’m working on with him.)  
My code compiles, however when I enter the url that the php is located at ( [[COLOR=#000099][FONT=Arial]http://www.jtworld.net/data\_test.php[/FONT][/COLOR]](http://www.jtworld.net/data_test.php) ) and press the but to retrieve the variables, I get this error:

```auto
TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at loaders::Retreuvak/loadvars()[C:\Users\user\Documents\flash	est_files\loaders\Retreuvak.as:33]
    at Load_test_main/doIt()[C:\Users\user\Documents\flash	est_files\Load_test_main.as:30]

```

I’ve looked it up and apparently it’s most commonly received when someone is trying to reference a movieclip that hasn’t been loaded or added to the display yet, however since I’m not even using movieclips here I’m not sure what I’m doing wrong.

I’ve provided a .zip of my files along with the php script that is being hosted on the server, so I won’t post my code here and take up pagespace.
