<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Upload - Bartdevos.be</title>
<style type="text/css">
<!--
.q { COLOR: #0000cc
}
.style6 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.style8 {
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
}
.style9 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<div align="center">
<table width="431" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="style6"><div align="left">
<?php
$Bestemming = 'filles/'; // waar moet dat heen?
if(isset($_POST['upload'])) {
for($i=0; $i<10; $i++) {
if (isset($_FILES['foto'.$i]) && is_uploaded_file($_FILES['foto'.$i]['tmp_name'])) {
copy($_FILES['foto'.$i]['tmp_name'], $Bestemming.$_FILES['foto'.$i]['name']);
}
}
print'<a href=\'index.php\'>Klik om meer bestanden te uploaden</a>';
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1;URL=index.php\";>";
}
else {
$_POST['aantal'] = isset($_POST['aantal']) ? 1*$_POST['aantal'] : 1 ;
print'
<form method="post">
<div style="float:right; text-align:right">
<input type="text" name="aantal" size="2" value="'.$_POST['aantal'].'" /><input type="submit" class="button" value="Aantal" />
</div>
</form>
<form enctype="multipart/form-data" method="post">';
for($i=0; $i<$_POST['aantal']; $i++) {
$nummer = $i + 1;
print'
'.$nummer.' <input name="foto'.$i.'" type="file" /><br />';
}
print'
<br /><input type="submit" name="upload" value="Bestand(en) uploaden" />
</form>';
}
?>
</div></td>
</tr>
</table>
</div>
</body>
</html>