Location: PHPKode > scripts > Form Mail Lite > form/forms/mail.php
<?php
require_once("cfg.php");
?>
<html> 
<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<title><?=$FormTitle?></title>
<STYLE type="text/css">
<!-- 
body, th, td { font-size: <?=$font?>px; }
-->
</STYLE>
</head> 
<div align="center"><br><br>
<?php 
if($_POST['action'] == "send"){

if (!$flag){
$ip = getenv("REMOTE_ADDR");
$Header2  = "From: ".$To."\r\n";
$Header2 .= "MIME-Version: 1.0\r\n";
$Header2 .= "Content-type: text/plain; charset=utf-8\r\n";
foreach ( $_POST as $key => $var ) {
$var = stripslashes($var);
if($key!='action'){
$_POST1 = $_POST1."\n".$key." = ".$var;
}
if(($key!='action')&&($key!='ip')&&($key!='host')&&($key!='useragent')&&($key!='referer')){
$_POST2 = $_POST2."\n".$key." = ".$var;
}
}
if($_POST['E-mail']){$Header = "From: ".$_POST['E-mail']."\r\n";$Header .= "MIME-Version: 1.0\r\n";$Header .= "Content-type: text/plain; charset=utf-8\r\n";}
if($_POST['E-mail']==''){$Header=$Header2;}
$Content=$_POST1;
$Content1=$_POST2."\n";
$Content2=$Text.$Content1.$Sign;
if (mail($To, $Subject, $Content, $Header)) {
echo $Complete;
if($Remail > 0){
mail($_POST['E-mail'], $Subject, $Content2, $Header2);
}
}
else{
echo "Error";
}
}
}
?>
<?php
if($_POST['action'] != "send"){
?>
<?php
if ($flag){
echo $errm;
}
?>
<?php
if (!$flag){
foreach($_POST as $key=>$var) {
$er .= "<INPUT type='hidden' name='$key' value='$var'>";
if(($key!='ip')&&($key!='host')&&($key!='useragent')&&($key!='referer')){
$var=nl2br($var);
$var=str_replace("\n","",$var);
$var=str_replace("\r","",$var);
$ms = $ms."<tr><td>".$key." = </td><td>".$var."<br></td></tr>";
}
}
echo "If all your information is correct please press the submit button below.<br><br><br>";
?>
<table>
<?=$ms?>
<form action="?fid=<?=$Fid?>" method="POST">
<?=$er?>
<?php
echo "<tr><td colspan='3' align='center'><br><br><br><input type='hidden' name='action' value='send'><INPUT type='button' value='Back' onClick='history.back()'> <input type='submit' value='Submit'></form></td></tr>";
}
?>
</table>
<?php
}
?>
</div>
</body>
</html>
Return current item: Form Mail Lite