# AMFPHP passing a variable

**URL:** <https://forum.kirupa.com/t/amfphp-passing-a-variable/308362>\
**Category:** flash\
**Created:** [April 21, 2010, 4:26pm UTC](https://forum.kirupa.com/t/amfphp-passing-a-variable/308362 "2010-04-21T16:26:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RossKidd](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@RossKidd](https://forum.kirupa.com/u/RossKidd)\
**Post date:** [April 21, 2010, 4:26pm UTC](https://forum.kirupa.com/t/amfphp-passing-a-variable/308362/1 "2010-04-21T16:26:07Z")

</div>

I am calling my getPortfolio method using the code below, I need to pass an id from flash to return the results. Any ideas how I would pass it from flash to my php method?

public function Connector() {

```
     var res:Responder = new Responder(onResult, onFault);
     var gw:NetConnection = new NetConnection();
    
    gw.connect("http://sp.localhost.com/amfphp/gateway.php");
    gw.call("Mysql.getPortfolio", res);
    
    
    
}

```

my php

function getPortFolio(id)

```
{

return mysql_query("select * FROM projects WHERE id='$id'");

}

```

I am doing the Lee Brimelow tut but he does not go into this.
