# Loading multiple records from php to flash

**URL:** https://forum.kirupa.com/t/loading-multiple-records-from-php-to-flash/70926
**Category:** flash
**Created:** [November 18, 2004, 10:32pm UTC](https://forum.kirupa.com/t/loading-multiple-records-from-php-to-flash/70926 "2004-11-18T22:32:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![liquid](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@liquid](https://forum.kirupa.com/u/liquid)
#### Post date: [November 18, 2004, 10:32pm UTC](https://forum.kirupa.com/t/loading-multiple-records-from-php-to-flash/70926/1 "2004-11-18T22:32:50Z")

</div>

Hello,

I am trying to load multiple records from MySql/php to flash.  
I can get one record to display but not sure how to do multiple records.

```php
Heres what I have so far...

$calculation = $_POST['dyears'];
$result = mysql_query("SELECT * FROM artists WHERE artname ='$calculation'");
if($row = mysql_fetch_array($result)){
	
	do{
		echo "&returnVal=".$row['imgpath'];
		
		
	}while($row = mysql_fetch_array($result));

}

```

here is what I have in flash

```auto
stop();
var lvOut:LoadVars = new LoadVars();
var lvIn:LoadVars = new LoadVars();
lvIn.onLoad = function(success) {
	if (success) {
		output = lvIn.returnVal;
	} else {
		output = "fail";
	}
};
myBtn.onPress = function() {
	lvOut.dyears = "Dan";
	lvOut.sendAndLoad("http://www.liquidesignz.com/nwjv/dogyears.php", lvIn, "POST");
};

```

Any direction would be appreciated!  
liquid
