Image uploading

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]