How do I make a script for a PHP IP Request?

Chris

New member
How do I make a line in a PHP script for when a form is submitted it will also supply the users ip address, also how do I add a time stamp as well? thanks

This is the current script I have,

<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

if (!isset($_REQUEST['email'])) {
header( "Location: http://www.yahoo.com" );
}

if (empty($email)) {
echo "Hello!" ;
}

else {
mail( "[email protected]", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.google.com" );
}
?>


Ignore the yahoo.com, google.com, and the plain ol hello, I have all that down, I just want to figure out how to request an IP address and also time stamp an email submission. Thanks
 
Back
Top