Web form application (email)
<?php
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$email_body = "";
$email_body = $email_body . "<strong>Name:</strong> " . $name . "<br>";
$email_body = $email_body . "<strong>Email:</strong> " . $email . "<br>";
$email_body = $email_body . "<strong>Message: </strong>" . $message . "<br>";
header("Location: contact.php?status=thanks");
}
?>
<table>
<tr>
<th>
<label for="name">Name:</label>
</th>
<td>
<input type="text" name="name" id="name">
</td>
</tr>
<tr>
<th>
<label for="email">Email:</label>
</th>
<td>
<input type="text" name="email" id="email">
</td>
</tr>
<tr>
<th>
<label for="message">Message:</label>
</th>
<td>
<textarea name="message" id="message"></textarea>
</td>
</tr>
</table>
<input type="submit" value="Send">
</form>
E.G.
header("Location: contact.php?message=thankyou");
<?php
if(isset($_GET["status"]) AND $_GET["status"] == "thanks") { ?>
<p>Ciao, sono Pashi, grazie per avermi mandato l'email. Ti rispondero' appena finisco la cacca!</p>
<?php } else { ?>
// BLA BLA BLA
<?php } ?>