Location: PHPKode > projects > Wiki-Map > htdocs/contact.php
<?

  define("CAPTCHA_INVERSE", 0);
  include "captcha.php";

 

if (isset($_POST[msg])){
	$res = captcha::check();
if (isset($res)) {
     if ($res) { 	
	$msg = "From: ".$_POST[frm]."<".$_POST[email].">\n\n".$_POST[msg];
	$from = "From: visitor@{$_SERVER['SERVER_NAME']}\r\n" ;
	mail('hide@address.com',$_POST[sub],$msg,$from);
	header("Location: http://" . $_SERVER['HTTP_HOST']);
	exit;
	} else {
	header("Location: http://" . $_SERVER['HTTP_HOST']."/contact.php");
	exit;
	}}
}


echo <<<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
   <META NAME="Keywords" CONTENT="Map, wikimap, wikipedia, contact">
	<META NAME="Description" CONTENT="Contact form of WikiMap. A collaborative Map building tool based on Google Map to share your location and other geo-information. A knowledge repository and collection of planning tools.">
   <META NAME="Author" CONTENT="hide@address.com">   
   <title>WikiMap: User Documentation</title>
   <link rel="stylesheet" type="text/css" href="wikimap.css">    
  </head>
  <body>
    <div id="docs">
    

 <H4>Send mail to </H4>
 <FORM action=contact.php method=POST>
 <table>
 <tr><td>
 From:</td><td><INPUT type=text name=frm value='Write your name' size=35></td><td> E-Mail:</td><td><INPUT type=text name=email value='Your e-mail' size=35></td></tr>
 <tr><td>Subject:</td><td colspan=3> <INPUT type=text name=sub size=85></td></tr>
 </table>
 Message<BR><TEXTAREA name=msg cols=65 rows=15>Type your message here</TEXTAREA><BR>

END;
 
 echo captcha::form();

 echo "\n<INPUT type=SUBMIT value=SEND><INPUT type=RESET>"
			."</FORM>"
			."</div>\n\n";

    include "wikifoot.php";
?>
Return current item: Wiki-Map