I got the form
[code=html]<form method=”POST” action=”mailer.php”>
<?php $ipi = getenv(“REMOTE_ADDR”); ?>
<input type=”hidden” name=”ip” value=”<?php echo $ipi ?>” />
Name:<br>
<input type=”text” name=”name” size=”40″ class=”request”>
<br>
<br>
Your email:<br>
<input type=”text” name=”email” size=”40″ class=”request”>
<br>
<br>
Message:<br>
<textarea rows=”9″ name=”message” cols=”100″ class=”request”></textarea>
<br>
<br>
<input type=”submit” value=”Submit” name=”submit” class=”request”></form>
and mailer.php
[code=php] <?php
if(isset($_POST[‘submit’])) {
$to = “[email protected]”;
$subject = “Contact Form”;
$name_field = $_POST[‘name’];
$email_field = $_POST[’email’];
$message = $_POST[‘message’];
$ip = $_POST[‘ip’];
$body = “From: $name_fieldn E-Mail: $email_fieldn Message: $messagen IP: = $ip”;
include(‘sent.php’);
mail($to, $subject, $body);
} else {
echo “There was an error”;
}
?>
But when I receive the mail, it has no “from” part and just says nobody
It just bugs me. :rolleyes: