I've got a contact form on my website which doesn't show the IP of the user who sents a message as it used to. What code i need to insert for that? Remember am a n00b.
This is the code i have:
<?
//Destination Email ID
$to = "enquiry@wave.co.uk";
//Name of the Person
$name = addslashes($_POST['author']);
$phone = addslashes($_POST['url']);
//Email Id of the person
$email = addslashes($_POST['email']);
$comment = addslashes($_POST['comment']);
//Feedback detail
//$feedbacknew = $_GET['feedback'];
//Subject line of the email
$subject = "Wave"." "."$email";
$matter = '<div style=" width: 500px; padding: 20px; border: 5px solid #017ac1;">
<div><b>Name</b> : '.$name .'</div>
<div><b>Contact</b> : '.$phone.'</div>
<div><b>Email</b> : '.$email.'</div>
<div><b>Comments</b> : '.$comment.'</div>
</div>';
/******** Email body *************/
/
$matter = "Below are the details filled by"." "."$namenew"."\n\n".
"Name:"." "."$name"."\n\n".
"Email:"." "."$email"."\n\n".
"Contact No:"." "."$contactno"."\n\n".
"Comment:".$comment ;
/
/*******************************************/
// To send HTML mail, the Content-type header must be set
$headers = 'From: '.$email."\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
mail("$to", "$subject","$matter","$headers");
header("location:thanks.htm");
exit;
?>