/
form.php
37 lines (36 loc) · 1.33 KB
/
form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
$factoryList=array("AMF","Poparada","BRW","Gerbor","Lisogor","Vika","Domini","SidiM","Come-for","Livs","Nova", "FunDesk", "Agat-M", "Oris", "Kidigo_1", "Kidigo_2", "Sportbaby", "Veres", "Smoby", "Ployana", "SleepAndFly", "OrisInStore", "A_Class", "Veres_instore", "BabyMarket_instore","BabyMarket", "InStore");
function CreateSelect($factoryList,$name,$selectedVal="")
{
$htmlString="<select name='$name'>";
foreach ($factoryList as $factory)
{
if ($selectedVal=$factory)
{
$htmlString.="<option selected value='".$factory."'>".$factory."</option>";
}
else
{
$htmlString.="<option value='".$factory."'>".$factory."</option>";
}
}
$htmlString.="</select>";
return $htmlString;
}
?>
<html>
<body>
<form enctype="multipart/form-data" action="import.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="200000000" />
<table width="600">
<tr>
<td>File:</td>
<td><input type="file" name="file"/></td>
<td>Factory:</td>
<td><?echo CreateSelect($factoryList,"factory"); ?></td>
<td><input type="submit" value="Upload"></td>
</tr>
</table>
</form>
</body>
</html>