So I have almost no idea about php coding and I am trying to get this form to work and be secure. I keep getting Parse error: syntax error, unexpected T_VARIABLE on line 23 of the process.php file.
This is the code for the form
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Author: Reality Software
Website: http://www.realitysoftware.ca
Note: This is a free template released under the Creative Commons Attribution 3.0 license,
which means you can use it in any way you want provided you keep the link to the author intact.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="style.css" rel="stylesheet" type="text/css" /><style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.style1 {color: #FF0000}
-->
</style></head>
<body>
<!-- header -->
<div id="header">
<div id="logo"> <a href="index.html">Veritas Endurance Coaching</a>
<br />
<br />
Family-Work-Performance...Balanced</div>
<div id="menu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about_us.html">About Us</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="partners.html">Partners</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
</div>
</div>
<!--end header -->
<!-- main -->
<div id="main">
<div id="sidebar">
<a href="http://www.guenergy.com/" target="_blank">
<img src="images/GU_Logo.jpg" border="0" /> </a> <br /> <br />
<a href="http://messerbodiesbydesign.com/Home_Page.html" target="_blank">
<img src="images/messer.gif" border="0" /> </a> <br /> <br />
<a href="http://www.zootsports.com/" target="_blank">
<img src="images/zoot.jpg" border="0" /> </a> <br /> <br />
<a href="http://www.sram.com/" target="_blank">
<img src="images/sram_red_logo1.jpg" border="0" /> </a> <br /> <br />
<a href="http://www.zipp.com/" target="_blank">
<img src="images/zipp_logo.gif" border="0" /> </a> <br /> <br />
<a href="http://www.wheeliefun.com/" target="_blank">
<img src="images/sp_wheeliefun_ad.gif" border="0" /> </a> <br /> <br />
<a href="http://www.conti-online.com/generator/www/de/en/continental/bicycle/general/home/index_en.html" target="_blank">
<img src="images/continental_0.jpg" border="0" /> </a> <br /> <br />
<a href="http://www.fizik.com/home.aspx" target="_blank">
<img src="images/FizikLO_small.jpg" border="0" /> </a> <br /> <br />
<a href="http://www.veritasfits.com/" target="_blank">
<img src="images/veritas_logo.gif" border="0" /> </a>
</div>
<div id="text" >
<h1><strong>Contact Form</strong></h1>
<p>Please fill out the form below and we will get back to you as soon as we can!</p>
<t><FORM METHOD="POST" ACTION="process.php">
<span class="style1">*Required</span><br />
Enter Your Name: <span class="style1">*</span><br />
<input type="text" name="required-yourname" size="30" maxlength="50" />
<br />
Your E-mail Address:<span class="style1"></span> <br />
<input type="text" name="required-email1" size="30" />
<br />
Enter Your Email Again:<span class="style1"></span> <br />
<input type="text" name="required-email" size="30" />
<br />
Area Code/Phone Number:<span class="style1"></span> <br />
<input type="text"
name="required-code" maxlength="3" size="5">
<input type="text" name="required-phone" maxlength="7" size="10">
<br /> <br />
Please Select Which Services You Are Interested In: (select all that apply):<span class="style1"></span> <br />
<input type="checkbox" name="mc" value="Monthly Coaching" /> Monthly Coaching <br />
<input type="checkbox" name="stp" value="Single Training Plan" /> 18 Week Training Plan <br />
<input type="checkbox" name="bf" value="Bike Fitting" /> Bike Fitting (in-store or on-site) <br />
<input type="checkbox" name="ppt" value="Power Testing" /> Progressive Power Testing <br /><br />
Please Enter Any Additional Information: <br />
<textarea name="comments" rows="7" cols="50"></textarea>
<br />
<br />
<?php
require_once('recaptchalib.php');
$publickey = "6LctrwgAAAAAAIeIgsGd3MNdd8jvAw0e_1UA4FC-"; // you got this from the signup page
echo recaptcha_get_html($publickey);
?>
<br />
<input type="submit" value="Send Now!" />
</FORM></t>
</div>
</div>
<!-- end main -->
<!-- footer -->
<div id="footer">
<div id="left_footer">© Copyright </div>
<div id="right_footer">
<!-- DO NOT DELETE THIS LINK! READ THE LICENSE! -->
Design by <a href="http://www.realitysoftware.ca" title="Website Design">Reality Software</a>
<!-- ****************************************** -->
</div>
</div>
<!-- end footer -->
</body>
</html>
And this if for process.php
<?php
if ($_SERVER["REQUEST_METHOD"] <> "POST")
die("You can only reach this page by posting from the html form");
require_once('../recaptchalib.php');
$privatekey = "6LctrwgAAAAAAPg2bptU6Ct-tf6kTeDXbuvf-gtK";
$resp = recaptcha_check_answer ($privatekey,
$SERVER["REMOTE_ADDR"],
$POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
}
$email1 = $REQUEST['required-email1'] ;
$email = $REQUEST['required-emai1'] ;
$yourname = $REQUEST['yourname'] ;
$code = $REQUEST['required-code'] ;
$phone = $REQUEST['required-phone'];
$Monthly Coaching = $REQUEST['mc'];
$Single Training Plan = $REQUEST['stp'];
$Bike Fitting = $REQUEST['bf'];
$Progressive Power Test = $REQUEST['ppt'];
$comments = $REQUEST['comments'];
mail( "cody.bohachek@gmail.com", "VEC Website reposnses", $message, "From: $required-email1" );
header( "Location: http://www.veritasendurance.com/thankyou.html" );
?>
I haven't even gotten to the email yet so I have no clue what information will be sent to me if it works. Any advice on that matter would be awesome too.