Silly loadVariables question

Hey guys here’s a silly question (i hope):

I’m trying to get some data back from a PHP script I wrote, and when I hand code a query string into loadVariables() the flash end of this whole thing works correctly… the dynamic text fields populate properly.

But, when I try to create a URL based on some input text that I am trying to send, I get nothing.

Here’s the offending script attached to a movie clip that holds my text field:

[AS]onClipEvent(load){
loadVariables(“http://www.mobcar.com/rbng.php?firstName="+firstName+"&lastName=”+lastName, this, “POST”);
trace("name: “+rbngFirst+” "+rbngLast);
}
[/AS]

trace just says "name: "… nothing more.

I tried using a loadVars solution as well… still nothing.

I’ve attached my .fla in case anyone wants to dive deeper.

I am incredibly rusty at AS (was never that great to begin with), so any help is much appreciated.

"I’ve attached my .fla " … where?
and the fla by itself is useless, would need to get a look at the PHP too…

Well, I did try to attach the .fla… apparently it was too big (206k). I’ve trimmed out all the graphics and am trying again with this post.

Here’s the PHP… very straighthforward mySQL stuff.


<?php
// Other parts of the script where I actually come up with $fnTotal
// and lnTotal has been deleted since it works and has little to do
// with the problem.

// Look up the results
$cn = mysql_connect("localhost", $user, $pswd);
if(!$cn)
     die("Couldn't connect to MySQL");
mysql_select_db($db, $cn)
     or die("Couldn't open ".$db.": ".mysql_error());
$firstResult = mysql_query("SELECT firstName FROM rbngFirst WHERE result = ".$fnTotal);
while($a_row = mysql_fetch_array($firstResult)){
	$rbngFirstName = $a_row['firstName'];
}
$lastResult = mysql_query("SELECT lastName FROM rbngLast WHERE result = ".$lnTotal);
while($a_row = mysql_fetch_array($lastResult)){
	$rbngLastName = $a_row['lastName'];
}
print "&rbngFirst=".urlencode($rbngFirstName)."&rbngLast=".urlencode($rbngLastName);
mysql_close($cn);
?>

THe above script works fine. In fact, if you go to http://www.mobcar.com/rockme.html and fill out the form, it will spit out the string that the .fla is supposed to be loading.

Now hopefully this will help :blush:

I finally got it figured out. Everything works fine now!