# Help please with uploading file with flash and php

**URL:** https://forum.kirupa.com/t/help-please-with-uploading-file-with-flash-and-php/272516
**Category:** Uncategorized
**Created:** [October 6, 2008, 3:00am UTC](https://forum.kirupa.com/t/help-please-with-uploading-file-with-flash-and-php/272516 "2008-10-06T03:00:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![small\_me](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@small\_me](https://forum.kirupa.com/u/small_me)
#### Post date: [October 6, 2008, 3:00am UTC](https://forum.kirupa.com/t/help-please-with-uploading-file-with-flash-and-php/272516/1 "2008-10-06T03:00:00Z")

</div>

hi guys im a newbie here  
im currently having a proble with uploading an image with Flash  
I used filereference

The deal is that i should save first the file to be uploaded in a variable  
then after all needed has been entered there will be a save button at the end  
how will i be able to save the file saved in my variable in the database

tnx tnx tnx

— here’s my actionscript  
import flash.net.FileReference;  
var listener:Object = new Object();  
var imageFile:FileReference = new FileReference();

imageFile.addListener(listener);

listener.onSelect = function(selectedFile:FileReference):Void {  
\_global.filename1 = selectedFile.name;  
trace("File Upload 1: "+\_global.filename1);  
}

function uploadImage(event:Object):Void {  
imageFile.browse([{description: "Image Files ", extension: “_.jpg;_.gif”}]);  
}

choose\_picture.onPress = uploadImage;  
;(;(;(;(;(
