here you go:
changes:
always start hp files with <?php. You never know what platform you'll be running on so declare it's PHP.
stop relying on register_globals to be 'on'. It is bad practice as it makes it easier for developers to create security holes. I removed all variables using register_globals, replaced them by $_FILES['userfile'] everywhere.
Note: you were mixing the $FILES variable with the $userfile variable. I don't think that's "wrong" but it definitely isn't good either! Use $FILES.
All this is documented on the PHP 'uploading files' page:
http://ch2.php.net/features.file-upload
I also commented out the unnecessary html form at the bottom of your page. Fell free to uncomment.
this works fine, tested (careful about the wrapping):
<?php
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<form enctype="multipart/form-data" action="<?=$PHP_SELF?>" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="10240" />
Send this file: <input name="userfile" type="file" />
<BR>
<BR>
<input type="submit" value="Send File" />
</form>
<br>
<br>
<?php
while(list($key, $val) = each($_POST)) {
$$key = $val;
echo "key=".$key." val=".$val."<br>"; // For debug purpose
}
echo "<br>";
echo "files_tmp_name=".$_FILES['userfile']['tmp_name']; // For debug purpose
echo "<br>";
echo "file name= ".$_FILES['userfile']['name']."<br><br>"; // For debug purpose
$uploaddir="images";
if ( is_uploaded_file($_FILES['userfile']['tmp_name']) ) {
move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir."/".$_FILES['userfile']['name']);
}
?>
<!--
price: <INPUT TYPE="text" NAME="price"><BR>
price_sale: <INPUT TYPE="text" NAME="price_sale"><BR>
details: <INPUT TYPE="text" NAME="details"><BR>
rem1: <INPUT TYPE="text" NAME="rem1"><BR>
rem2: <INPUT TYPE="text" NAME="rem2"><BR>
rem3: <INPUT TYPE="text" NAME="rem3"><BR><BR>
<INPUT TYPE="reset" value="send"> <INPUT TYPE="submit" value=reset>
</FORM>
-->
</BODY>
</HTML>