# Flash and PHP FileUpload

**URL:** https://forum.kirupa.com/t/flash-and-php-fileupload/371712
**Category:** flash
**Created:** [November 26, 2014, 5:56pm UTC](https://forum.kirupa.com/t/flash-and-php-fileupload/371712 "2014-11-26T17:56:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![neo0800](https://avatars.discourse-cdn.com/v4/letter/n/a88e57/32.png) [@neo0800](https://forum.kirupa.com/u/neo0800)
#### Post date: [November 26, 2014, 5:56pm UTC](https://forum.kirupa.com/t/flash-and-php-fileupload/371712/1 "2014-11-26T17:56:02Z")

</div>

Hey Guys…

I wana Upload a file with flash and php WITHOUT using FileReference. What I want is to give the exact File Path (of my Computer) to the php File. I tried this, but without any success.

```
var URLrequest:URLRequest = new URLRequest("http://www.[myServer]/php/uploader_script.php");
filePath.text = "C:\\Users\\Admin\\Pictures\\"

buttonUpload.addEventListener(MouseEvent.CLICK, bUpload);
function bUpload (MouseEvent):void{
    
    
    var variables:URLVariables = new URLVariables();
    variables.Filedata = filePath.text;
    variables.name = "new.jpg";
    URLrequest.method = URLRequestMethod.POST;
    URLrequest.data = variables;
}  

```

and this is my php file:

```
<?php
$todayDate = $_POST['todayDate'];
$Name = $_POST['Name'];
$Email = $_POST['Email'];
$filename = $_FILES['Filedata']['name'];    
$filetmpname = $_FILES['Filedata']['tmp_name'];    
$fileType = $_FILES["Filedata"]["type"];
$fileSizeMB = ($_FILES["Filedata"]["size"] / 1024 / 1000);

move_uploaded_file($_FILES['Filedata']['tmp_name'], "files/".$filename);

?>

```

So… I hope somebody of you can help me!

King regards
