close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

I have spen days trying to get the Captcha Validation to work with no success. I printed the Form Toolkit tutorial and followed it step by step. But the validation never catches the mis-matched entry. Can you review my cold and tell me where I am go

Thread began 4/25/2019 12:21 pm by John | Last modified 5/02/2019 11:14 am by Ray Borduin | 327 views | 3 replies |

John

I have spen days trying to get the Captcha Validation to work with no success. I printed the Form Toolkit tutorial and followed it step by step. But the validation never catches the mis-matched entry. Can you review my cold and tell me where I am going wr

<?php require_once("webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("webassist/form_validations/wavt_validatedform_php.php"); ?>
<?php
if ((((isset($_POST["submit"]))?$_POST["submit"]:"") != "")) {
$WAFV_Redirect = "forgot_password.php";
$_SESSION['WAVT_forgotpassword_758_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateLE($_SESSION['captcha_Security_Code_1'] . "",((isset($_POST["Security_Code_1"]))?$_POST["Security_Code_1"]:"") . "",true,1);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"forgotpassword_758");
}
}
?>
<?php require_once('Connections/connCACCAi.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php
$rsSell_Member = new WA_MySQLi_RS( "rsSell_Member", $connCACCAi, 0 );
$rsSell_Member->setQuery( "SELECT full_name, email, password FROM tblmembers ORDER BY full_name ASC" );
$rsSell_Member->execute();
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="ccs/style.css" type="text/css"/>
<title>Chicago Area Camera Club Association - CACCA Member - Forgot your Password</title>
<meta name="Description" content="Chicago Area Camera Club Associations"/>
<meta name="Keywords" content="Chicago Area Camera Club Associations, Camera Club, Illinois, Northern Suburbs, Chicago Area, CACCA, Photography"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Page-Enter" content="revealtrans(duration=0.0)"/>
<meta http-equiv="Page-Exit" content="revealtrans(duration=0.0)"/>
<meta http-equiv="Refresh" content=""/>
<meta name="ROBOTS" content="index,follow"/>
<meta name="Author" content="John Rouse"/>
<script type="text/javascript">
</script>
<style>
.box-shadow {
border: 1px solid;
padding: 10px;
box-shadow: 5px 10px #888888;
}

</style>
<style type="text/css">
<!-- body {
background-color: #6A6969;
}

-->

</style>
</head>

<body>

<!-- DO NOT MOVE! The following AllWebMenus linking code section must always be placed right AFTER the BODY tag-->
<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu ******** -->
<script type="text/javascript">
var MenuLinkedBy = "AllWebMenus [4]",
awmMenuName = "menu",
awmBN = "882";
</script>
<script charset="UTF-8" src="nav_cacca/menu.js" type="text/javascript"></script>
<script type="text/javascript">
awmBuildMenu();
</script>
<!-- ******** END ALLWEBMENUS CODE FOR menu ******** -->

<div align="center">
<div id="layout">
<div id="welcomezone">
<div style="padding:10px 0 10px 0">
<div class="servicecolumnzone">
<div class="servicecolumn1">
<div align="left">
<?php include('inc_sponsors.php'); ?>
</div>
<div class="clear"></div>
</div>
<?php // End servicecolumn1 and Begin servicecolumn2 ?>
<div class="servicecolumn2">
<?php // Begin Content Table ?>
<table class="box-shadow" width="840" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="8" id="Content Table">
<tbody>
<tr>
<td align="left"><span class="style22B">FORGOT YOUR PASSWORD</span>
<hr class="big">
<div></div>
<div align="center">
<form action="forgot_password_send.php" method="post" name="frmPass" target="_self" id="frmPass">
<?php //Begin Member Selection Table ?>
<div align="center">
<table align="center" width="800" border="0" cellspacing="0" cellpadding="0" id="Member Selection Table">
<tbody>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="144" align="right" valign="top" class="style16B">Select Member:&nbsp;&nbsp;</td>
<td width="211" valign="top">&nbsp;&nbsp;
<select name="full_name" id="full_name">
<option value="value" <?php if (!(strcmp( "value", ($rsSell_Member->getColumnVal("full_name"))))) {echo "selected=\"selected\"";} ?>>Select your name</option>
<?php
while ( !$rsSell_Member->atEnd() ) { //dyn select
?>
<option value="<?php echo($rsSell_Member->getColumnVal(" full_name ")); ?>"<?php if (!(strcmp($rsSell_Member->getColumnVal("full_name"), ($rsSell_Member->getColumnVal("full_name"))))) {echo "selected=\"selected\"";} ?>>
<?php echo($rsSell_Member->getColumnVal("full_name")); ?>
</option>
<?php
$rsSell_Member->moveNext();
} //dyn select
$rsSell_Member->moveFirst();
?>
</select>
</td>
<td width="445" class="style16BlueB" with="440">Names are listed in alphabetical order. Hint, type the first name or just letter of the first name to narrow your search.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><img id="capt1" src="webassist/captcha/wavt_captchasecurityimages.php?width=200&height=50&field=Security_Code_1&bgcolor=FFFFFF&transparent=1&bgimage=&gridfreq=25&gridcolor=000000&gridorder=behind&noisefreq=50&noisecolor=F5F5F5&noiseorder=behind&characters=5&charheight=&font=fonts/MODERNA_.TTF&textcolor=000000" alt="security code" width="200" height="50"/><img src="webassist/captcha/images/refresh.png" height="18" onclick="document.getElementById('capt1').src+='&ref=1'"/><br/>
<input id="Security_Code_1" name="Security_Code_1" type="text" value=""/>

<?php
if (ValidatedField('forgotpassword_758','forgotpassword_758')) {
if ((strpos((",".ValidatedField("forgotpassword_758","forgotpassword_758").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
Validation failed. Press the 'Refresh Button' and try again.
<?php //WAFV_Conditional forgot_password.php forgotpassword_758(1:)
}
}
}?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">
<input class="style16B" type="submit" name="submit" id="submit" value="&nbsp;&nbsp;&nbsp;SEND EMAIL&nbsp;&nbsp;&nbsp;"/>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
</tbody>
</table>
<?php //End Member Selection Table ?>
</div>
</form>
</div>
</td>
</tr>
</tbody>
</table>
<?php // End Content Table ?>
<div class="clear"></div>
</div>
<?php // End servicecolumn2 ?>
</div>
<?php // End servicecolumnzone ?>
</div>
<?php // End padding ?>
</div>
<?php // End welcomezone ?>
</div>
<?php //layout ?>
</div>
</body>
</html>

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of the page instead of cutting and pasting... it is much more difficult for me to debug when I can't open it in Dreamweaver.

It looks like your form action may post to a different page... if so, the the validation would have to be on that page and not this one. Most likely you can move the server validation code to the forgot_password_send.php page and specify the failed redirect to go back to this page and that would make it work properly.

Sign in to reply to this post
Did this help? Tips are appreciated...

John

Email sending with validation

Ray,
I am attaching the two files I am having problem with. Per your recommendation, I removed the “forgot_password_send.php” from the form’s action. Now the validation works. But I see no way to send the ‘full_name” from the foregot_password.pdf form frmPass to the forgot_password_send.php to email the user’s password. I would have preferred the email code be on the same page as the validation, but I couldn’t get it to work either. Can you give me some direction? I am a newbee to this. The website is caccaphoto.org and the Forgot Your Password link is in the first option under the LOGIN OPTIONS.

Attached Files
forgot_password.php
forgot_password_send.php
Sign in to reply to this post

Ray BorduinWebAssist

Add a recordset to the forgot_password.php page to filter by the selected member chosen. Then add the email all on that one page. You can probably just cut and paste those two pieces from the forgot_password_send.php page. Make sure the trigger for the email is the same as the trigger for the validation.

You can probably remove your forgot_password_send.php page... it shouldn't be needed.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...