Simple form that returns ip address

I have a form that someone else did and I am asked to change it so the form results that are emailed back from the forem have the IP address of the user.

I know nothing about coding php. I see examples of the “userip…source etc.” but dont have a clue where to put the code in the form.

The form itself is easy to read in the code. But this part I’m not sure of, and if this is where the USERIP line would go:
(starting with the end of form code)

<?php }
	elseif($status == 'send')
	{
		$Name = ($_POST['Name']);
		$Email = ($_POST['Email']);
		$Company = ($_POST['Company']);
		$Street = ($_POST['Street']);
		$City = ($_POST['City']);
		$State = ($_POST['State']);
		$Zip = ($_POST['Zip']);
		$Where = ($_POST['Where']);
		$Message = ($_POST['Message']);

$myemail = "[email protected]";
$subject = “Message from Email Form”;
$message = "The following message was sent from the Contact Page:

NAME: $Name
EMAIL: $Email
COMPANY: $Company

ADDRESS:
$Street
$City, $State $Zip

WHERE DID YOU HEAR ABOUT OPC?
$Where

MESSAGE: $Message";

mail($myemail, $subject, $message);

echo"Thank you. Your email has been sent.";
}

if I need to post the entire form, just let me know!! Thank you in advance!

Make sure that you add the following in your :
[php][/php]

I hope this helps,…

Kind Regards

Sponsor our Newsletter | Privacy Policy | Terms of Service