i have preety lam3 question about formatting text in my php script. point of the code below is to get ip of the submitter and sent his ip to his email (it's stupid cause i modified script to be as small as possible)
Code: Select all
<?
function getIP() {
$ip;
if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP");
else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR");
else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
else $ip = "UNKNOWN";
return $ip;
}
$message .= "\nYour IP is: ".getIP();
$message .= "\n\nThanks";
require("class.smtp.php");
$smtp=new smtp();
$smtp->host_name = "localhost";
$smtp->localhost = "localhost.domain";
$frm = "me@mysite.com";
$to = $Mail;
$subject = "some subject";
$smtp->SendMessage( $frm, array( $to ), array( "From: $frm", "To: $to", "Subject: $subject" ), $message );
header ("Location: http://www.mysite.com/submitted.html");
?>Code: Select all
$message .= "<b style="color:red;">" Thanks "</b>";Code: Select all
$message .= "<strong>Thanks</strong>"Code: Select all
$message .= "<b>Thanks</b>"Code: Select all
$message .= "\bThanks\b0"Thanks in advance,
John