How to Create a Browse Button
- 1). Fire up your text editor. Now type the following text into notepad or your favorite text editor:
<html>
<title>Intro To Upload Forms</title>
<body>
<p>Click below to go to the upload form!</p>
<a href="/links/?u=../upForm.php">Click Here...</a>
</body>
</html>
Save this file as "index.html." Remember to change the file type to "all files" in the "Save as" field. - 2). Make the actual upload form. Start by opening up a new file in notepad, where you will type in the following code:
<html>
<head>
<title>Upload Your Files Here</title>
</head>
<body>
Select the file to upload. Only one file at a time allowed.<br>
<form action="upForm.php" method="post"><br>
Choose Your File: <input type="file" name="uploadFile">
<input type="hidden" name="MAX_FILE_SIZE" value="15000" />
<input type="submit" value="Submit">
</form>
</body>
</html>
Save this file as "upForm.php." - 3). Open your FTP client. Once your FTP is loaded, you can now upload the two files you created to the server. After the file transfer is complete, open your Web browser and type the path to the "index.html" file you just uploaded.
- 4). Follow the link in "index.html" and try out the upload button you've just created. Because this is a basic form, nothing will upload to the server. The links below deal with adding functionality.