you need to use a server side language... have the HTML form post to a PHP page like this:
HTML:
<form enctype="multipart/form-data" action="submit.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
<table>
<tr>
<td>Name: </td>
<td><input type="text" name="name"></td>
<td>Password: </td>
<td><input type="password" name="passwd"></td>
<td>File: </td>
<td><input type="file" name="userfile"></td>
<td>email: </td>
<td><input type="text" name="email"></td>
</tr>
</table>
<input name="action" type="submit" value="Submit">
</form>
PHP: (upload code)
$uploadDir = 'uploads/';
$filename=trim($_FILES['userfile']['name']);
$uploadFile = $uploadDir . $filename;
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile)) {
print "file was successfully uploaded. <br />";
}
else {
print "Upload failed! Here's some debugging info: \n";
print_r($_FILES);
}
and if you are going to do anything with the other fields you should think about using a MySQL database. go to
http://www.php.net/mysql for some more info on that.