# Help request : loadVariables from php

**URL:** <https://forum.kirupa.com/t/help-request-loadvariables-from-php/171868>\
**Category:** Uncategorized\
**Created:** [December 8, 2005, 9:09pm UTC](https://forum.kirupa.com/t/help-request-loadvariables-from-php/171868 "2005-12-08T21:09:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitras](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nitras/32/1475_2.png) [@nitras](https://forum.kirupa.com/u/nitras)\
**Post date:** [December 8, 2005, 9:09pm UTC](https://forum.kirupa.com/t/help-request-loadvariables-from-php/171868/1 "2005-12-08T21:09:01Z")

</div>

Hi there,

i want to display an amount of movieclips acording to how much the value is from a php file.  
it works fine. i use a dyn. text field with the var name : uonline;  
it kindly outputs the correct value taken from an php file using mysql.

but for my attachmovie script i am using K as another variable.

so heres i my ‘partial’ php code

```auto
//Database-Commands
$result =	@mysql_query("INSERT INTO $db_table VALUES ('$time','$ip','$file')",$handler);    	
$result =	@mysql_query("DELETE FROM $db_table WHERE time<'$elapsedtime'",$handler);	
$result =	@mysql_query("SELECT DISTINCT ip FROM $db_table",$handler);
$totalusers = @mysql_numrows($result);
//Print Output

if($outformat=="HTML"):

	echo "<table width=\"$twidth\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
		echo "<tr>"; 
			echo "<td bgcolor=\"$bghl\" align=\"center\">";
    			echo "<font face=\"$ffacehl\" size=\"$fsizehl\" color=\"$fcolorhl\">";
					if($totalusers>1):
					echo $totalusers." ".$text2;
					else:
					echo $totalusers." ".$textl;
					endif;
				echo "</font>"; 
			echo "</td>";
		echo "</tr>";
	echo "</table>";

elseif($outformat=="FLASH"):

	if($totalusers>1):
//	echo "uonline=".$totalusers." ".$text2;
	echo "uonline=".$totalusers." ".$text2."&timeout=".($timeout*60*1000)."&preload=1";
	else:
//	echo "uonline=".$totalusers." ".$textl;
	echo "uonline=".$totalusers." ".$textl."&timeout=".($timeout*60*1000)."&preload=1";
	endif;

endif;

@mysql_close();
?>

```

as you can see uonline displays in flash the output.

in flash i need to use this script to attach my mc’s…  
it works i tried it with a basic number. works fine.

```auto

K = 15;
for (i=0;i<K;i++){
	var t = this.attachMovie ("bol", "bol" +i,i);

```

i load the php file with : loadVariables (“useronline.php”,this);

how do i say that K equals the numeric value that is been loaded from the php file? in other words K needs to be equal to the numeric value of the textfield with var name uonline.

i am willing to share an fla for the ones that can help me, since this is a professional purpose i can’t put it straight online.

i just can’t get it to work 😕

cheers & thanks in advance
