22 lines
597 B
PHP
22 lines
597 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: Utilisateur
|
|
* Date: 2021-03-10
|
|
* Time: 14:19
|
|
*/
|
|
if(!empty($_FILES)) {
|
|
|
|
if(is_uploaded_file($_FILES['userImage']['tmp_name'])) {
|
|
$sourcePath = $_FILES['userImage']['tmp_name'];
|
|
$targetPath = "preprod/images/evenements/".$_FILES['userImage']['name'];
|
|
if(move_uploaded_file($sourcePath,$targetPath)) {
|
|
?>
|
|
<img src="<?php echo $targetPath; ?>" width="100px" height="100px" />
|
|
<?php
|
|
}else {
|
|
echo "Not uploaded because of error #".$_FILES["file"]["error"];
|
|
}
|
|
}
|
|
}
|
|
?>
|