Creating a Multi-File Upload Script in PHP - Number of Upload Boxes Required

Started by ganeshbala, Apr 19, 2008, 08:28 PM

Previous topic - Next topic

ganeshbala

Number of Upload Boxes Required

uploadForm1 . php

<html>
<head>
<title># of Files to Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="uploadForm2.php">
  <p>Enter the amount of boxes you will need below. Max = 9.</p>
  <p>
    <input name="uploadNeed" type="text" id="uploadNeed" maxlength="1">
  </p>
  <p>
    <input type="submit" name="Submit" value="Submit">
  </p>
</form>
</body>
</html>

As you can see this first page is very basic. In my form I set the uploadNeed maxlength to 1. This way the max upload boxes he or she can get is 9. You can increase or decrease this to satisfy your own project needs.