Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
<form method="POST" enctype="multipart/form-data"
action="php/upload.php" class="dropzone">
<div class="fallback">
<input name="file" type="file" multiple />
<input type="hidden" id='id' name="id" value="1">
</div>
<button type="submit">Eingaben absenden</button>
</form>
<form method="POST" action="php/upload.php" class="dropzone">
<div class="fallback">
<input name="file" type="file" multiple />
<input type="hidden" id='id' name="id" value="1">
</div>
<button type="submit">Eingaben absenden</button>
</form>
<form action="php/upload.php?id=DEINEUSERID" class="dropzone">
<div class="fallback">
<input name="file" type="file" multiple />
</div>
</form>
<?php
include "_functions.php";
include "_db.php";
$ds = DIRECTORY_SEPARATOR; //1
$storeFolder = '../usr_img'; //2
if (!empty($_FILES)) {
$tempFile = $_FILES['file']['tmp_name']; //3
$targetPath = dirname( __FILE__ ) . $ds. $storeFolder . $ds; //4
$date = uniqid();
$targetFile = $targetPath.$date."_".$_FILES['file']['name']; //5
move_uploaded_file($tempFile,$targetFile); //6
thumbnail($targetFile);
$sql="INSERT INTO sn_usr_images (img_usrid, img_name, img_date) VALUES ('".$_GET['id']."', '".$date."_".$_FILES['file']['name']."', NOW())";
$db->query($sql);
}
?>