# Image uploading

**URL:** <https://forum.kirupa.com/t/image-uploading/272373>\
**Category:** Uncategorized\
**Created:** [October 4, 2008, 5:28pm UTC](https://forum.kirupa.com/t/image-uploading/272373 "2008-10-04T17:28:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arundracula](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@arundracula](https://forum.kirupa.com/u/arundracula)\
**Post date:** [October 4, 2008, 5:28pm UTC](https://forum.kirupa.com/t/image-uploading/272373/1 "2008-10-04T17:28:40Z")

</div>

I found a working script for image uploading through PHP.

[COLOR=#000000]html code is:

\<html\>  
\<head\>  
\<title\>File Upload Form\</title\>  
\</head\>  
\<body\>  
This form allows you to upload a file to the server.\<br\>

\<form action=“getfile.php” enctype=“multipart/form-data” method=“post”\>\<br\>  
Type (or select) Filename: \<input type=“file” name=“uploadFile”\>  
\<input type=“submit” value=“Upload File”\>  
\</form\>

\</body\>  
\</html\>

=======================

and PHP code is:

\<html\>  
\<head\>  
\<title\>Process Uploaded File\</title\>  
\</head\>  
\<body\>  
\<?php

move\_uploaded\_file ($\_FILES[‘uploadFile’] [‘tmp\_name’],“uploaded\_files/{$\_FILES[‘uploadFile’] [‘name’]}”)

?\>  
\</body\>  
\</html\>

Now the question is, how can I replace the html with flash actionscript. I found if the word [/COLOR][COLOR=#000000]enctype=“multipart/form-data” is not present , upload doesn’t takeplace.

Also how can I rename the uploading file in flash itself- like when we press upload, send the target filename also to PHP.  
[/COLOR]
