<form id='newsletter' style="margin-right:0px;margin-left:0px;margin-bottom:5px;margin-top:0px;padding:0px;width:180px" action="/lists/?p=subscribe" method="post" name="subscribeform">
<label for="Email" style="padding-top:3px;font-size:10px;width:33px;float:left;clear:left;color:navy;font-weight:bold;margin-right:0px;margin-bottom:2px">Email</label><input name="email" type="text" style="font-size:10px;width:127px;height:13px;color:navy;background:#F5FFFA;border:1px solid #8FB98E;margin-bottom:2px;margin-left:3px" id="Email" value="" size="20" maxlength="100" />
<script language="Javascript" type="text/javascript">addFieldToCheck("email","Email");</script>
<input name="attribute4" type="hidden" value="" />
<input type="hidden" name="list[2]" value="signup" />
<input type="hidden" name="listname[2]" value="Club Wager Newsletter" />
<input type="hidden" name="htmlemail" value="1" />
<input name="subscribe" type="submit" style="height:22px;width:52px;text-align:center;font-size:10px;padding:0px;margin-right:0px;margin-left:0px;margin-bottom:0px;margin-top:0px;float:left;clear:left;" value="Continue" onclick="return checkform();" /> </form>
$randval = mt_rand();
// begin captcha code
if(USE_CAPTCHA){
include("../captcha/SPAF_FormValidator.class.php");
$obj = new SPAF_FormValidator();
if (isset($_POST['Verification'])) {
if ($obj->validRequest($_POST['Verification'])) {
// destroy successful code
$obj->destroy();
}
else {
exit('<p>Verification Code was entered incorrectly.</p> <p><ol><li>Please use the "back" button on your browser to return to the form, and</li><li>Fill out the form and re-submit it with the verification characters correctly entered.</li></ol>If you keep getting this error, please contact us for assistance.</p>');
}
}
}
// end captcha code
if (empty($data['button'])) {
$data['button'] = $GLOBALS['strSubmit'];
}
// begin captcha code
if(USE_CAPTCHA)
$html .= '<table><tr><td><img src="../captcha/img.php?&<?php echo time(); ?>" alt="Enter these 6 characters in the box below."></td></tr><tr><td><div class="required">Enter the Verification Code from the above box:</div></td><td class="attributeinput"> <input name="Verification" class="attributeinput" size="6" maxlength="6" value="" id="verification_code" type="text"><script language="Javascript" type="text/javascript">addFieldToCheck("Verification","verification_code");</script></td></tr></table>';
// end captcha code
# to use captcha on subscription forms set this to true; to not use it set this to false
define("USE_CAPTCHA",true);
// begin captcha code
if(USE_CAPTCHA)
$html .= "<table><tr><td><img></td></tr><tr><td><div>Enter the Verification Code from the above box:</div></td><td> <input><script>addFieldToCheck(\"Verification\",\"verification_code\");</script></td></tr></table>";
// end captcha code
When posting HTML code on the forum, you should make sure you click on "Disable HTML in this post" on the left of youradmash wrote:EDIT: I see what happened now, the forum edits the script when we post. To get the script to work, you have to add
the 'src' and path to img.php inside the <img> tag (spaced out for the forum):
<img>
include("http://[yourdomain]/lists/captcha/SPAF_FormValidator.class.php");
Users browsing this forum: No registered users and 1 guest