esercizi su form, php

This commit is contained in:
2014-11-07 21:34:49 +01:00
parent 3924e6bf32
commit 8f485b73b3
9 changed files with 510 additions and 0 deletions

51
php7.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
require_once ('functions.php');
include('header.html');
///////////////////////////
echo<<<_css
<style>
select {
width:100px;
}
</style>
_css;
echo "\n";
///////////////////////////
if (count($_FILES)==0){
echo "<form action=\"",$_SERVER['PHP_SELF'],"\" method=\"POST\" enctype=\"multipart/form-data\" > ";
echo "<input type=\"file\" name=\"gino\" >";
echo "<input type=\"submit\">";
echo "</form>";
}else {
$file = $_FILES['gino']['name'];
move_uploaded_file($_FILES['gino']['tmp_name'], $_SERVER["DOCUMENT_ROOT"]."uploaded/$file");
}
include ('footer.html');
?>