return to first page linux journal archive
keywordscontents

Listing 4. HTML Form for Uploading Files

<HTML>
<Head>
<Title>Upload a file to our Web site</Title>
</Head>
<Body>
<H1>Upload a file to our Web site</H1>
<P>This form allows you to upload a file.</P>
<Form method="POST" action="/cgi-bin/upload-file.pl" 
ENCTYPE="multipart/form-data">
<table>
<tr>
	<td>
	Name the file as it appears on your computer:
	</td>
	<td>
	<INPUT NAME="userfile" TYPE="file"
value="">
	</td>
</tr>
<tr>
	<td>
	Enter the name it should get on the Web site:
	</td>
	<td>
	<INPUT NAME="filename" TYPE="text">
	</td>
</tr>
<tr>
	<td>
	Into which section should the file be placed?
	</td>
	<td>
	<select name="section">
	<option value="">Select a section
	<option value="A">Area A
	<option value="B">Area B
	<option value="C">Area C
	</select>
	</td>
</tr>
<tr>
	<td>
	Enter the section password:
	</td>
	<td>
	<INPUT NAME="password" TYPE="password">
	</td>
</tr>
</table>
<P><Input type="submit" value="Upload
file">
   <input type="reset" value="Start
over"></P>
</Form>
</Body>
</HTML>