Ciao a tutti ,allora...
Ho scaricato due pagine php (una contact,e l'altra send) per creare un form mail sulla pagina contatti del mio sito.
La prima(contact.php)contiene solo i form,la seconda(send)ha del codice.
Ho preso tutto ho copiato ed incollato tutto in una pagina nuova php....
Per la cosa voglio fare, non ci sarebbe bisogno del lato server almeno cosi' era riportata nella didascalia da dove ho preso il tutto.
Qualcuno potrebbevedere il codice e spiegarmi gentilmente qualcosa?

Codice: nell'head ho messo questo

<?php
$receiverMail = "your@email.com";

$name = ltrim(rtrim(strip_tags(stripslashes($_POST['name']))));
$email = ltrim(rtrim(strip_tags(stripslashes($_POST['email']))));
$subject = ltrim(rtrim(strip_tags(stripslashes($_POST['subject']))));
$msg = ltrim(rtrim(strip_tags($_POST['msg'])));

$ip = getenv("REMOTE_ADDR");
$msgformat = "From: $name ($ip)\nEmail: $email\n\n$msg";

// VALIDATION
if(empty($name) || empty($email) || empty($subject) || empty($msg)) {
echo "<h3>The email was not sent</h3>

Please fill all the required fields</p>";
}
elseif(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
echo "<h3>The email was not sent</h3>

The email address is invalid</p>";
}
else {
mail($receiverMail, $subject, $msgformat, "From: $name <$email>");
echo "<h3>The email has been sent!</h3>

I will get back to you as soon as possible.</p>"; }
?>
nel body questo


<form method="post" action="send.php">
Name:
<input name="name" type="text" size="30" maxlength="40" />


Email:
<input name="email" type="text" size="30" maxlength="40" />


Subject:
<input name="subject" type="text" size="30" maxlength="40" />


Message:
<textarea name="msg" cols="50" rows="6"></textarea>


<input type="reset" value="Reset" /><input type="submit" value="Send" />
</form>