Et udsnit af HTML-koden:
<form METHOD="POST" ACTION="upload.asp" NAME="upload"
ENCTYPE="multipart/form-data">
<table CELLSPACING="0" BORDER="0" WIDTH="500">
<tr>
<td width="125"><div align="left">upload foto</td>
<td width="300"><input TYPE="file" name="fil" size=37></td>
</tr>
<tr>
<td width="125"><div align="left">e-mail adresse</td>
<td width="300"><small><input TYPE="TEXT" name="e-mail
adresse" value="" size=37><br></small></td>
</tr>
<tr>
<td width="125"><div align="left">ønsket navn/alias</td>
<td width="300"><small><input TYPE="TEXT" name="ønsket
navn/alias" value="" size=37><br></small></td>
</tr>
</table>
<br>
<input type="Submit" value="Send">
</form>
...og et udsnit af ASP-koden:
<%
' Variables
' *********
Dim mySmartUpload
Dim item
Dim value
Dim file
' Object creation
' ***************
Set mySmartUpload =
Server.CreateObject("aspSmartUpload.SmartUpload")
' Tillad kun filer af typen JPEG, JPG eller GIF
' ***************
mySmartUpload.AllowedFilesList = "jpg,jpeg,gif"
' Upload
' ******
mySmartUpload.Upload
Response.Write("<BR>fil uploadet til lasciv.dk<BR><BR>")
For each file In mySmartUpload.Files
Response.Write("filnavn = " & file.FileName & " (" &
file.Size & " bytes)<BR>")
Next
For each item In mySmartUpload.Form
' Select each value of the current item
' *************************************
For each value In mySmartUpload.Form(item)
Response.Write(item & " = " & value & "<BR>")
Next
Next
%>
Næsten hele ovennævnte kode er taget fra ASPSmartUpload's
hjemmeside, men hvor gemmes dataen fra HTML-dokumentet?!?
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials