I wan to the system to field up the ip address automatic then send it into the body message but it out error can help me about this

$fields{$_SERVER['REMOTE_ADDR']}="IP Address";
$body = "Here is the following detail:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

Notice: Undefined index: 10.10.10.92 in C:\Program Files\EasyPHP 3.0\www\send.php on line 25

I think you are trying to do this:

$fields['IP Address'] = $_SERVER['REMOTE_ADDR'];
$body = "Here is the following detail:\n\n";
foreach($fields as $a => $b)
{ 
    $body .= sprintf("%20s: %s\n",$a,$b);
}

tHANK YOU

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.