# Sending variables to php

**URL:** <https://forum.kirupa.com/t/sending-variables-to-php/306781>\
**Category:** flash\
**Created:** [March 22, 2010, 12:45pm UTC](https://forum.kirupa.com/t/sending-variables-to-php/306781 "2010-03-22T12:45:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lillo\_\_hotmail](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@lillo\_\_hotmail](https://forum.kirupa.com/u/lillo__hotmail)\
**Post date:** [March 22, 2010, 12:45pm UTC](https://forum.kirupa.com/t/sending-variables-to-php/306781/1 "2010-03-22T12:45:56Z")

</div>

Hi!

I’m using the following script to let the user upload a file. I would like to send two strings to the php as well. Is there an easy way to implement that in this script?

Hope you all have a great day!!!

import flash.net.FileReference;

var listener:Object = new Object();

listener.onSelect = function(file:FileReference):Void  
{  
if(!file.upload(“[http://localhost/uploader\_script.php](http://localhost/uploader_script.php)”))  
{  
trace(“Upload dialog failed to open.”);  
}

}

var fileRef:FileReference = new FileReference();  
fileRef.addListener(listener);  
btnBrowse\_mc.onRelease = function()  
{  
fileRef.browse(allTypes);  
}
