Hit F1 in flex and search for 'FileReference' this will give you examples of how to handle the flex side of uploading. Pass the multipart/form-data to the server side PHP that accepts an argument 'Filedata'.