-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
44 lines (38 loc) · 956 Bytes
/
index.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
38
39
40
41
42
43
44
<?php
$rand = mt_rand();
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Example of fileupload with GLPI API</title>
<!-- meta -->
<meta name="author" content="Alexandre DELAUNAY">
<style>
body {
max-width: 400px;
margin: 0 auto;
}
label,
input[type=submit] {
display: block;
font-weight: bold;
margin-top: 1.5em;
}
input[type=text] {
width: 90%;
}
</style>
</head>
<body>
<header>
<h1>Test form for upload documents to glpi API</h1>
</header>
<form action="upload.php" method="POST" enctype="multipart/form-data">
<label for="docname">Document's name:</label>
<input type="text" name="document_name" id="docname" value="My document uploaded by api">
<label for="file">File:</label>
<input type="file" name="filename<?php echo $rand ?>[]" id="file">
<input type="submit" name="submit">
</form>
</body>