[SOLVED] Simple Form Processing Script + Captcha Issue
Posted: Tue Oct 13, 2009 8:59 pm
Hello guys,
I'm working on a simple form for a client which is 100% done. He wanted a captcha and I did install it on the form and tested and it worked wonderfully. However, when I placed the PHP code within the new template page it does not work. I think is because there is more PHP going around in there and I have no clue on how to fix it. However, this is code the client placed in there and I do not want to touch anything that could modify it UNLESS it is to make mine work!
PAGE CODE (What I added starts on line 205 & ends on 224):
Thank you for your help!
k.
I'm working on a simple form for a client which is 100% done. He wanted a captcha and I did install it on the form and tested and it worked wonderfully. However, when I placed the PHP code within the new template page it does not work. I think is because there is more PHP going around in there and I have no clue on how to fix it. However, this is code the client placed in there and I do not want to touch anything that could modify it UNLESS it is to make mine work!
PAGE CODE (What I added starts on line 205 & ends on 224):
Code: Select all
<?php
/**
* validateManageComponent($input = component name)
*/
if ( is_file( dirname(__FILE__) . "/scripts/rvslib/component/rvsManageComponent.php") ) {
include( dirname(__FILE__) . "/scripts/rvslib/component/rvsManageComponent.php");
rvsManageComponent::validateManageComponent('Online_Form');
} elseif ( is_file( dirname(dirname(__FILE__)) . "/.rvsitebuilder/rvsManageComponent.php") ) {
include( dirname(dirname(__FILE__)) . "/.rvsitebuilder/rvsManageComponent.php");
rvsManageComponent::validateManageComponent('Online_Form');
}
?>
<!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" xml:lang="en" lang="en">
<head>
<title>EBG - Message Status</title>
<meta http-equiv="Content-Type" content="text/html; charset =iso-8859-15" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" href="http://ecossebg.com/style.css" type="text/css" />
<link rel="stylesheet" href="http://ecossebg.com/Arial.css" type="text/css" />
<link rel="stylesheet" href="http://ecossebg.com/2a1f96cb8d8172207002d92b0a82bc3a.css" type="text/css" />
<link rel="stylesheet" href="http://ecossebg.com/pathway.css" type="text/css" />
<script language="JavaScript" type="text/javascript" src="http://ecossebg.com/rvsincludefile/rvsnavigator.js"></script>
<script language="JavaScript" type="text/javascript" src="http://ecossebg.com/js/layersmenu-library.js"></script>
<script language="JavaScript" type="text/javascript" src="http://ecossebg.com/js/layersmenu.js"></script>
<script language="JavaScript" type="text/javascript" src="http://ecossebg.com/rvsincludefile/rvscustomopenwindow.js"></script>
</head>
<body >
<table cellpadding="0" cellspacing="0" id="rv_top_adjust_width_0" width="100%" align="Center" >
<tr>
<td>
<!-- START LOGO -->
<div style="position: absolute;">
<div id="Layer1" style="position:relative; left:100px; top:30px; width:120; height:60; text-align:center; z-index:1; overflow:visible; white-space:nowrap;"></div>
</div>
<div style="position: absolute;">
<div id="Layer2" style="position:relative; left:37px; top:69px; width:auto; height:auto; text-align:left; z-index:2; overflow:visible; white-space:nowrap;" class="company">Ecosse Business Group, LLC</div>
</div>
<div style="position: absolute;">
<div id="Layer3" style="position:relative; left:58px; top:123px; width:auto; height:auto; text-align:left; z-index:3; overflow:visible; white-space:nowrap;" class="slogan">Where experience counts</div>
</div>
<!-- END LOGO -->
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><img src="images/img_01.jpg" alt="" width="273" height="167" /></td>
<td class="bgtop" width="99%"></td>
<td><img src="images/img_02.jpg" alt="" width="247" height="167" /></td>
<td><img src="images/img_03.jpg" alt="" width="260" height="167" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#ffffff">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="bg_l"><img src="images/spacer.gif" alt="" width="22" height="1" /></td>
<td align="left" valign="top" width="99%">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" height="32" width="99%" class="menu"><div id="navigator">
<ul id="navigator">
<li><a href="index.php" id="normal" target="_self" ><span>Home</span></a></li>
<li><a href="About-us.php" id="normal" target="_self" ><span>About us</span></a></li>
<li><a href="Services.php" id="normal" target="_self" ><span>Services</span></a></li>
<li><a href="Green-Products.php" id="normal" target="_self" ><span>Green Products</span></a></li>
<li><a href="Contact-Us.php" id="current" target="_self" ><span>Contact Us</span></a></li>
<li><a href="News--and--Events.php" id="normal" target="_self" ><span>News & Events</span></a></li>
</ul>
</div>
</td>
</tr>
<tr>
<td width="99%" align="left" valign="top">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="99%"><img src="images/spacer.gif" alt="" width="1" height="4" /></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<!-- Begin PATHWAY and ICON -->
<tr>
<td class="magin">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<!-- Begin PATHWAY -->
<td align="left" width="99%"><?php $thisPage = (defined("RVS_COMPONENT_NAME")) ? RVS_COMPONENT_NAME . "-utf-8" : "form";
include("/home/ecosseb1/public_html/rvsincludefile/pathway_" . $thisPage . ".html"); ?></td>
<!-- End PATHWAY -->
<!-- Begin ICON -->
<td align="right"></td>
<!-- End ICON -->
</tr>
</table>
</td>
</tr>
<!-- End PATHWAY and ICON -->
<tr>
<td align="left" valign="top">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" class="magin" id="rv_adjust_width_63" width="100%">
<p> </p>
<p>
<?php
if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') {
echo '<strong>Incorrect verification code. Please go back and try again.</strong><br>';
} else {
// Form Data
$message = "Name:".$_POST["name"]. "\r\n";
$message .= "Email".$_POST["email"]. "\r\n";
$message .= "Message:".$_POST["message"]. "\r\n";
$to = "email@myemail.com";
$subject = "Contact Request";
$headers = "From: otheremail@email.com\r\n";
if (mail($to,$subject,$message,$headers));
else
return false;
//End Form Data
echo '<strong>Email sent successfully. We will contact you soon!</strong><br>';
};
?>
</p>
<p> </p></td>
</tr>
</table>
</td>
</tr>
<!-- Begin FOOTER -->
<tr>
<td align="center" class="magin"></td>
</tr>
<!-- End FOOTER -->
<tr>
<td align="center" valign="bottom">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="bottom" class="marginpw"></td>
<td width="8"></td>
<td align="center" valign="bottom" class="marginpw"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td class="bg_r"><img src="images/spacer.gif" alt="" width="18" height="1" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><img src="images/img_04.jpg" alt="" width="36" height="37" /></td>
<td class="menu" width="99%"></td>
<td><img src="images/img_05.jpg" alt="" width="32" height="37" /></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>k.