|
Post by Tau Online on May 19, 2004 17:24:59 GMT
Hi! I am using this script: <?php include("global.inc.php"); $errors=0; $error="The following errors occured while processing your form input.<ul>"; pt_register('POST','Name'); pt_register('POST','Emailaddy'); pt_register('POST','Type'); pt_register('POST','Content'); $Content=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Content);if($Name=="" || $Type=="" || $Content=="" ){ $errors=1; $error.="<li>You did not enter one or more of the required fields. Please go back and try again."; } if($errors==1) echo $error; else{ $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/")); $message="Name: ".$Name." Email Address: ".$Emailaddy." Type of submission: ".$Type." Content: ".$Content." "; $message = stripslashes($message); mail("submissions@tauonline.org","Form Submitted at your website",$message,"From: phpFormGenerator"); header("Refresh: 0;url=http://www.tauonline.org/thanks.htm"); } ?> To send this form. I want to make it so that it will print the submitters IP address in the e-mail, right under 'E-Mail Address' So the e-mail I would recieve would look like: myweb.tiscali.co.uk/gamersplace/email.jpg(Although the IP address would be in the same font as the rest!) Could anyone help me please? Thanks in advance
|
|
|
Post by Ron on May 19, 2004 19:48:37 GMT
$message="Name: ".$Name." Email Address: ".$Emailaddy." Ip Address: ".$_SERVER['REMOTE_ADDR']." Type of submission: ".$Type." Content: ".$Content." ";
|
|
|
Post by Nocando on May 20, 2004 4:27:46 GMT
As always, Ron to the rescue ;D
|
|
|
Post by Tau Online on May 20, 2004 13:29:08 GMT
$message="Name: ".$Name." Email Address: ".$Emailaddy." Ip Address: ".$_SERVER['REMOTE_ADDR']."Type of submission: ".$Type." Content: ".$Content." "; Thanks Ron I appreciate it
|
|
|
Post by Ron on May 20, 2004 21:19:20 GMT
You're welcome
|
|