<?php
session_start();
if( $_SESSION['code'] == $_POST['code'] && !empty($_SESSION['code'] ) ) {
$to = "myemail@gmail.com";
$from = "Fan of Hi Techs Local!";
$email_subject = "Mail from Hi Techs Local Fan";
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$link = $_POST['link'];
$winchoice = $_POST['winChoice'];
$email_body = "You have received a new message from " . $name . ". Email: " . $email . ". Message: " . $message;
mail($to, $from, $email_subject, $email_body);
echo '<script language="Javascript">';
echo 'window.open("win1.html","Window1","menubar=no,width=430,height=360,toolbar=no")';
} else {
echo '<script language="Javascript">';
echo 'window.open("win2.html","Window1","menubar=no,width=430,height=360,toolbar=no")';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Contact Us</title>
<!-- InstanceEndEditable -->
<link rel="stylesheet" href="style.css" media="screen" />
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" src="js/validate.js"></script>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<div id="style" class="marksform">
<form id="submitForm" name="submitForm" method="post" action="" onsubmit="return validate_form();">
<div id="group1">
<label>Name
<span class="small">Please tell us your name</span></label>
<input type="text" name="name" id="name" onkeydown="inputCounter(this.form.name,this.form.remName,30);" onkeyup="textCounter(this.form.name,this.form.remName,30);"/>
<label>Email
<span class="small">Please provide your email</span></label>
<input type="text" name="email" id="email" onkeydown="inputCounter(this.form.email,this.form.remEmail,30);" onkeyup="textCounter(this.form.email,this.form.remEmail,30);"/>
<label>Message
<span class="small">Please provide a detailed message</span></label>
<textarea name="message" id="message" cols="60" rows="5" onkeydown="textCounter(this.form.message,this.form.remLen,512);" onkeyup="textCounter(this.form.message,this.form.remLen,512);"></textarea>
</div>
<div class="spacer"></div>
<div id="captcha">
<img src="captcha/captcha_code_file.php" />
<label>Security Code
<span class="small">Enter code from image</span></label>
<input type="text" name="code" id="code" />
</div>
<p></p>
<div class="buttons">
<button TYPE=reset NAME="resetButton" VALUE="Reset">Clear</button>
<button TYPE=submit NAME="submitbutton" VALUE="Submit">Submit</button>
</div>
<div class="spacer"></div>
</form>
</div>
</body>
<!-- InstanceEnd --></html>
Thanks for any info you may be able to provide.
Regards,
Mark

New Topic/Question
Reply




MultiQuote




|