Script for uploading files onto the server
Hello,
I am looking for a script that will allow my clients to upload their file (: *.pdf, *.jpg, *.png, *.gif and *.zip formats) onto the server holding my website; from a form on my site.
Probably the script should be housed in the main directory or presumably in the cgi-bin directory.
The underlying principles (of the script) should take into consideration the issues of security pertaining to the type of files that are allowed to be uploaded.
The configuration of the form is as below. The script should perform the "action" of "UpLoadOrder.aspx" within the form.
Many thanks in advance for the script (hans.adamsson(at)wippies.com)
Regards,
Maunu
&&&&&&&&&&&&&&&
<form name="form1" method="post" action="UpLoadOrder.aspx" id="form1" onsubmit="return OnFormSubmit()" enctype="multipart/form-data">
<div><strong><span id="LabelUploadConfirm" class="grey-txt">Complete the following information and then upload file:</span></strong>
<div id="PanelUploadForm">
<table class="bder" width="100%" align="center" border="0" cellpadding="2" cellspacing="0">
<tbody><tr>
<td class="grey-txt">Name:</td>
<td><input name="CustName" id="CustName" onblur="CheckInput(this,'SpanCustName','Customer Name Required...')" type="text"><br><span id="SpanCustName" class="alertMessage"></span></td>
</tr>
<tr>
<td class="grey-txt">Company:</td>
<td><input name="CustCompany" id="CustCompany" onblur="CheckInput(this,'SpanCustCompany','Company Name Required...')" type="text"><br><span id="SpanCustCompany" class="alertMessage"></span></td>
</tr>
<tr>
<td class="grey-txt">Email Address:</td>
<td><input name="CustEmail" id="CustEmail" onblur="CheckInput(this,'SpanCustEmail','Email Address Required...')" type="text"><br><span id="SpanCustEmail" class="alertMessage"></span></td>
</tr>
<tr>
<td class="grey-txt">Phone Number:</td>
<td><input name="CustPhone" id="CustPhone" onblur="CheckInput(this,'SpanCustPhone','Phone Number Required...')" type="text"><br><span id="SpanCustPhone" class="alertMessage"></span></td>
</tr>
<tr>
<td class="grey-txt">Upload File:</td>
<td><input name="FileUpload" id="FileUpload" class="grey-head" size="15" contenteditable="false" type="file"><br><span id="SpanFileUpload" class="alertMessage"></span></td>
</tr>
<tr>
<td colspan="2" class="grey-txt"><a href="#" onclick="return OnFormSubmit()"><img src="upload.gif" alt="Upload Now" title="Upload" width="90" border="0" height="24"></a></td>
</tr>
</tbody></table>
</div>
</div>
</form>