# \[basic php\] loadvars trouble

**URL:** <https://forum.kirupa.com/t/basic-php-loadvars-trouble/159327>\
**Category:** programming\
**Created:** [August 16, 2005, 7:15pm UTC](https://forum.kirupa.com/t/basic-php-loadvars-trouble/159327 "2005-08-16T19:15:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan786](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@ryan786](https://forum.kirupa.com/u/ryan786)\
**Post date:** [August 16, 2005, 7:15pm UTC](https://forum.kirupa.com/t/basic-php-loadvars-trouble/159327/1 "2005-08-16T19:15:46Z")

</div>

I’m sorry, as I’m sure this has been posted a million times before, but I’ve read other posts & done a few tutorials and I just can’t get the hang of this.

All I want to do is pass a variable from a php script to a flash movie. My flash code is as follows:

```auto
 
var vars = new LoadVars();
vars.onLoad = function(success)
{
	for(var prop in this ) 
	{
		trace ("key " + prop + " = " + this[prop]); 
	}
}
vars.load("c.php");
 

```

and the php script is just:

```auto
<?php
echo "hello=blah";
?>

```

thanks, and I’m sorry for such a basic question, I just can’t see why this doesn’t work. (the .fla and .php are both in the same directory)
