LoadVars PHP/Flash

Hey guys,

I’m hoping some of you can help me with this.

My goal is to be able to email an unique url which will reference a drawing that was previously created in Flash…
the drawing itself is composed by lots of movie clips that could each be on a certain frame (2-9)…
What I’m doing at this point is an insert into the database with the frame values for those clips everytime you want to “save/email to friend” your drawing.

So for example one would be “www.url.com/script.php/unique=12343254238997

unique’s value would be the “primary key” for the drawing and will return stuff like hat=2 so in flash I just want to do load_vars.hat so I can assign that number to the hat clip’s gotoAndPlay();

Now what I would ideally achieve is to be able to change unique’s value… click refresh… and have the swf now load the new values and basically change the look of the drawing.

I have this working to a point where I can echo the database values in the browser based on my url string so thats all good
The problem is that I can’t figure out how to have my swf that’s going to show the drawing to load those same values with every refresh… and not only that but it doesn’t even load them initially… so i’m looking at my monitor and seeing the echo to the browser update everytime with new values but my flash never changes.
Now I know what you’re thinking… my actionscript isn’t working but get this…

if instead of doing
I do
load_vars.load(“http://www.url.com/myscript.php?unique=123838483”, “_self”, “POST”);

then it actually WORKS and loads the values for that record and displays them.

It’s very confusing… I know… and I’ve been at it for a long time now so even if there’s some link you have in mind that could give me an insight id really appreciate it.

Here is my actual code

by the way I’m using SQL Server NOT MySQL


I’ve only ommitted the login values from the top… below this script is my html code that has the swf in it.

$sqlconnect = odbc_connect($dsn, $username, $password); 
$primo_from_url = $_GET['snowmanID']; 
$sqlquery="SELECT * FROM ".$table." WHERE snowmanID = '".$primo_from_url."'"; 
$result = odbc_exec($sqlconnect, $sqlquery); 
$messagetofriend = odbc_result($result,"messagetofriend"); 
$hat = odbc_result($result,"hat"); 
$eyepiece = odbc_result($result,"eyepiece"); 
$mouth = odbc_result($result, "mouth"); 
$clothing = odbc_result($result, "clothing"); 
$hands = odbc_result($result, "hands"); 
$background = odbc_result($result, "backgroun"); 
$vars = "&hat=".$hat."&eyepiece=".$eyepiece."&mouth=".$mouth."&clothing=".$clothing."&hands=".$hands."&backgroun=".$background; 
echo $vars; 


load_values = new LoadVars();
load_values.onLoad = function (success) {
        if (success) {
                //_root.message_txt.text = "loaded";
                //_root.message_txt.text = load_values.messagetofriend;
        } else {
                _root.message_txt.text = "NO SUCCESS";
load_values.load("snowman_mssql_flash.php", "_self", "POST");