-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
231 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
$mionome = $_GET["name"]; | ||
/* | ||
$messaggio = $_GET["messaggio"]; | ||
$sesso = $_GET["sesso"]; | ||
$interessi = $_GET["interessi"]; | ||
*/ | ||
|
||
?> | ||
|
||
<h2>La risposta</h2> | ||
|
||
Il tuo nome è: <?=$mionome?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
if(isset($_GET["name"])){ | ||
var_dump($_GET); | ||
foreach ($_GET as $key => $value) { | ||
echo "<br />"; | ||
var_dump($value); | ||
} | ||
die(); | ||
} | ||
|
||
?><!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Esempio di form</title> | ||
<!-- link rel="stylesheet" type="text/css" href="mystyle.css" --> | ||
</head> | ||
<body> | ||
|
||
<div class="content"> | ||
<h3>Esempio di form</h3> | ||
|
||
<?php | ||
$dest = $_SERVER['PHP_SELF']; | ||
$method = "GET"; // Metodo GET oppure POST | ||
|
||
/* | ||
var_dump($dest); | ||
die(); | ||
*/ | ||
?> | ||
|
||
<form accept-charset="UTF-8" action="<?php echo $dest; ?>" autocomplete="off" method="<?=$method?>"> | ||
<fieldset> | ||
<legend>Gruppo:</legend> | ||
<label for="name">Nome</label> | ||
<input name="name" type="text" value="" /> <br /> | ||
<br /> | ||
<label for="sex">Sesso</label> | ||
<input checked="checked" name="sex" type="radio" value="male" /> Male | ||
<input name="sex" type="radio" value="female" /> Female <br /> | ||
<br /> | ||
<textarea cols="30" rows="5" placeholder="Messaggio" name="messaggio"></textarea><br /> | ||
<br /> | ||
<label for="destinatario">Scrivi a:</label> | ||
<select name="destinatario"> | ||
<option selected="selected" value="0">Generale</option> | ||
<option value="1">Commerciale</option> | ||
<option value="2">Tecnico</option> | ||
</select><br /> | ||
<br /> | ||
<label for="interessi">Interessato a:</label> <br /> | ||
<input name="interessi[]" type="checkbox" value="sport" /> Sport<br /> | ||
<input name="interessi[]" type="checkbox" value="cinema" /> Cinema<br /> | ||
<input name="interessi[]" type="checkbox" value="musica" /> Musica<br /> | ||
<input name="interessi[]" type="checkbox" value="altro" /> Altro<br /> | ||
<br /> | ||
<button type="reset" value="Annulla">Annulla</button> | ||
<button type="submit" value="Submit">Invia</button> | ||
</fieldset> | ||
</form> | ||
</div> | ||
|
||
|
||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
// definisco mittente e destinatario della mail | ||
$nome_mittente = "Mio Nome"; | ||
$mail_mittente = "[email protected]"; | ||
$mail_destinatario = "[email protected]"; | ||
|
||
// definisco il subject ed il body della mail | ||
$mail_oggetto = "Messaggio di prova"; | ||
$mail_corpo = "Questo è un messaggio di prova per testare la mia applicazione"; | ||
|
||
// aggiusto un po' le intestazioni della mail | ||
// E' in questa sezione che deve essere definito il mittente (From) | ||
// ed altri eventuali valori come Cc, Bcc, ReplyTo e X-Mailer | ||
$mail_headers = "From: " . $nome_mittente . " <" . $mail_mittente . ">\r\n"; | ||
$mail_headers .= "Reply-To: " . $mail_mittente . "\r\n"; | ||
$mail_headers .= "X-Mailer: PHP/" . phpversion(); | ||
|
||
if (mail($mail_destinatario, $mail_oggetto, $mail_corpo, $mail_headers)) | ||
echo "Messaggio inviato con successo a " . $mail_destinatario; | ||
else | ||
echo "Errore. Nessun messaggio inviato."; | ||
|
||
?><!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Invio mail</title> | ||
</head> | ||
<body> | ||
|
||
<h3>Invio mail</h3> | ||
<p>Invio mail test</p> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Esempio di form</title> | ||
</head> | ||
<body> | ||
|
||
<h3>Esempio di form</h3> | ||
|
||
<form accept-charset="UTF-8" action="action_page.php" autocomplete="off" method="GET"> | ||
<fieldset> | ||
<legend>Login:</legend> | ||
<br /> | ||
<label for="name">Username: </label> | ||
<input name="name" type="text" value="" /> <br /> | ||
<br /> | ||
<label for="name">Password: </label> | ||
<input name="name" type="text" value="" /> <br /> | ||
<br /> | ||
<label for="interessi">Ricordami:</label> <input name="ricordami" type="checkbox" value="1" /> <br /> | ||
<br /> | ||
<button type="submit" value="Submit">Accedi</button> | ||
</fieldset> | ||
</form> | ||
|
||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"url": "https://docs.google.com/open?id=1M3s0xFVnufTa9AAu_ETlqobf9_ml97E0rrK4Riq435o", "doc_id": "1M3s0xFVnufTa9AAu_ETlqobf9_ml97E0rrK4Riq435o", "email": "[email protected]"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
|
||
body{ | ||
font-size: 1em; | ||
font-family: Helvetica; | ||
background-color: #FEFEFE; | ||
} | ||
|
||
.content{ | ||
margin: 20px auto; | ||
width: 90%; | ||
max-width: 800px; | ||
} | ||
|
||
h3{ | ||
text-align: center; | ||
color: red; | ||
text-transform: uppercase; | ||
font-size: 2em; | ||
} | ||
|
||
fieldset { | ||
padding: 40px 30px; | ||
border-radius: 15px; | ||
box-shadow: 10px 10px 20px #666; | ||
} | ||
|
||
textarea{ | ||
width:99%; | ||
} | ||
|
||
|
||
/** | ||
* 1. Change the font styles in all browsers. | ||
* 2. Remove the margin in Firefox and Safari. | ||
*/ | ||
|
||
button, | ||
input, | ||
optgroup, | ||
select, | ||
textarea { | ||
font-family: inherit; /* 1 */ | ||
font-size: 100%; /* 1 */ | ||
line-height: 1.15; /* 1 */ | ||
margin: 0; /* 2 */ | ||
} | ||
|
||
/** | ||
* Show the overflow in IE. | ||
* 1. Show the overflow in Edge. | ||
*/ | ||
|
||
button, | ||
input { /* 1 */ | ||
overflow: visible; | ||
} | ||
|
||
/** | ||
* Remove the inheritance of text transform in Edge, Firefox, and IE. | ||
* 1. Remove the inheritance of text transform in Firefox. | ||
*/ | ||
|
||
button, | ||
select { /* 1 */ | ||
text-transform: none; | ||
} | ||
|
||
/** | ||
* Correct the inability to style clickable types in iOS and Safari. | ||
*/ | ||
|
||
button, | ||
[type="button"], | ||
[type="reset"], | ||
[type="submit"] { | ||
-webkit-appearance: button; | ||
background-color: #3256d8; | ||
color: white; | ||
padding: 6px 14px; | ||
cursor: pointer; | ||
|
||
} | ||
|
||
|
||
|