diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..975700d --- /dev/null +++ b/functions.php @@ -0,0 +1,46 @@ + + \ No newline at end of file diff --git a/php_3.php b/php_3.php index c72e5e0..d94f0dc 100644 --- a/php_3.php +++ b/php_3.php @@ -1,7 +1,8 @@ +First name:
+ + + + +_HTML; } else { + echo "fattoriale " . fattoriale($_GET['numero']) . "\n"; + echo "
"; + + echo "primi "; + for ($i = 1;$i < $_GET['numero'] ; $i++) + { + if (isPrime($i)) + echo "$i "; + + } + echo "
"; + + echo "tabellina "; + for ($i = 1;$i <= 10 ; $i++) + { + echo $i * $_GET['numero'] . " "; + + } - echo "cioa"; } diff --git a/php_4.php b/php_4.php new file mode 100644 index 0000000..ba481be --- /dev/null +++ b/php_4.php @@ -0,0 +1,56 @@ + + + + + + + +_css; +echo "\n"; +/////////////////////////// + + +$interi = array (5,10,50,-20,54,100,200); +echo "min " . min($interi) . "\n"; +echo "
"; +echo "min " . max($interi) . "\n"; +echo "
"; +echo "somma " . array_sum($interi) . "\n"; +echo "
"; +echo "media " . array_sum($interi)/count($interi) . "\n"; +echo "
"; +echo "reverse "; +$rinteri=array_reverse($interi); +for ($i = 0;$i"; +for ($i = 0;$i"; + + + + + + + + +include ('footer.html'); + + + + + ?> \ No newline at end of file diff --git a/php_5.php b/php_5.php new file mode 100644 index 0000000..e0f1430 --- /dev/null +++ b/php_5.php @@ -0,0 +1,47 @@ + + + + + + + +_css; +echo "\n"; +/////////////////////////// + +echo<<<_html + + +
+ +Nome:
+Mail:
+Password:
+Verifica Password:
+ + + +
+ + +_html; + + + + + + +include ('footer.html'); + + + + + ?> \ No newline at end of file diff --git a/php_6.php b/php_6.php new file mode 100644 index 0000000..7c9b033 --- /dev/null +++ b/php_6.php @@ -0,0 +1,82 @@ + + + +input.prezzo { + border: 0px solid; + text-align: center; +} + + + +table, td { + + border: 1px solid black; +} + + +_css; +echo "\n"; +/////////////////////////// + + +if ($_GET == null){ + + + echo<<<_html + + +
+ + Primo Prezzo: euro
+ Secondo Prezzo: euro
+ Frutta Prezzo: euro
+ Costo servizio: euro
+ + + +
+ + +_html; + +}else { + + $totale = 0; + echo ""; + + echo "\n"; $totale+=$_GET['servizio_prezzo']; + + if (array_key_exists("primo", $_GET)) { echo "\n";$totale+=$_GET['primo_prezzo'];} + if (array_key_exists("secondo", $_GET)) { echo "\n";$totale+=$_GET['secondo_prezzo'];} + if (array_key_exists("frutta", $_GET)) { echo "\n";$totale+=$_GET['frutta_prezzo'];} + + echo "\n"; + + + + echo "
Costo Servizio " . $_GET['servizio_prezzo'] . "
Primo " . $_GET['primo_prezzo'] . "
Secondo " . $_GET['secondo_prezzo'] . "
Frutta " . $_GET['frutta_prezzo'] . "
Totale " . $totale . "
"; + + + + + +} + + + + + +include ('footer.html'); + + + + + ?> \ No newline at end of file diff --git a/php_7.php b/php_7.php new file mode 100644 index 0000000..3fa22a8 --- /dev/null +++ b/php_7.php @@ -0,0 +1,100 @@ + + + +h1 { + margin: 1.5em; +} + +table { + + border: 1px solid black; +} + +td.upper { + border-bottom:1px solid black; + +} +td.lower { + border-top:1px solid black; + +} + + + +_css; +echo "\n"; +/////////////////////////// + + +if ($_GET == null){ + + + echo<<<_html + + + + + + + + +

Scelta Utente

+
+ + Nome:
+ Password:

+ Quali argomenti vorresti approfondire?
+ Informazioni su HTML
+ Immagini
+ Collegamenti e url
+ Oggetti multimediali
+ XHTML versione 1.0
+ +
+ +
+ + +
+ +_html; + +}else { + + echo ""; + + echo "\n"; + + if (array_key_exists("op1", $_GET)) { echo "\n";} + if (array_key_exists("op2", $_GET)) { echo "\n";} + if (array_key_exists("op3", $_GET)) { echo "\n";} + if (array_key_exists("op4", $_GET)) { echo "\n";} + if (array_key_exists("op5", $_GET)) { echo "\n";} + + + echo "
Nome " . $_GET['nome'] . " Password : " . $_GET['password'] . "
Approfondimento " . $_GET['op1'] . "
Approfondimento " . $_GET['op2'] . "
Approfondimento " . $_GET['op3'] . "
Approfondimento " . $_GET['op4'] . "
Approfondimento " . $_GET['op5'] . "
"; + + + + + +} + + + + + +include ('footer.html'); + + + + + ?> \ No newline at end of file diff --git a/stampa.php b/stampa.php new file mode 100644 index 0000000..67ba709 --- /dev/null +++ b/stampa.php @@ -0,0 +1,51 @@ + + + + + + + +_css; +echo "\n"; +/////////////////////////// + + + +if ($_GET == null) + echo "No data to display\n"; +else { + + if ($_GET['password_1'] == $_GET['password_2'] ) { + + echo "Nome " . $_GET['name'] . "\n
"; + echo "Mail " . $_GET['mail'] . "\n
"; + echo "Password " . $_GET['password_1'] . "\n
"; + + + } else { + + echo 'Dati Inseriti invalidi'; + } + + + + +} + + + + +include ('footer.html'); + + + + + ?> \ No newline at end of file