close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Editing the security settings in Contactus.php

Thread began 8/28/2009 12:03 pm by larsentim278054 | Last modified 9/01/2009 12:15 pm by Jason Byrnes | 2540 views | 5 replies |

larsentim278054

Editing the security settings in Contactus.php

I want to remove the captcha security (but keep the question security intact). What code do I need to remove?

Sign in to reply to this post

Jason ByrnesWebAssist

From the contactus.php page, remove the following two code chunks:

line 227 - 249:

php:
<p>

               <div class="text"><img  src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=<?php echo $WAGLOBAL_Captcha_Noise?>&bgcolor=<?php echo $WAGLOBAL_Captcha_BG?>&textcolor=<?php echo $WAGLOBAL_Captcha_Text?>&transparent=<?php echo $WAGLOBAL_Captcha_BG_transparent?>&characters=<?php echo $WAGLOBAL_Captcha_Characters?>&width=<?php echo $WAGLOBAL_Captcha_Width?>&height=<?php echo $WAGLOBAL_Captcha_Height?>&font=<?php echo $WAGLOBAL_Captcha_Font?>" alt="security code" /></div>
            </p>
            <p>
                <label for="Security_code">Security Code:</label>
                        <span id="sprytextfield3">
                            <input name="Security_code" type="text" class="inputValue" id="Security_code" onblur="if (document.getElementById('captchaServerError')) document.getElementById('captchaServerError').style.display='none'" maxlength="40" />
                            <span class="textfieldRequiredMsg">A value is required.</span>
                <span class="textfieldMinCharsMsg">Minimum number of characters not met.</span>
                <span class="textfieldMaxCharsMsg">Exceeded maximum number of characters.</span>
              </span>
                        <?php
                            
if (ValidatedField("contact","contact"))  {
                                if ((
strpos((",".ValidatedField("contact","contact").","), "," "4" ",") !== false || "4" == ""))  {
                                    if (!(
false))  {
                            
?>
                                    <span id="captchaServerError" class="textfieldServerError">Your security code entry did not match the image.</span>
                                    <?php //WAFV_Conditional contact.php contact(4:)
                                    
}
                                }
                            }
?>
            </p>





and line 25:

php:
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_code"]))?strtolower($_POST["Security_code"]):"") . "",((isset($_SESSION["captcha_1"]))?strtolower($_SESSION["captcha_1"]):"") . "",true,4);
Sign in to reply to this post

larsentim278054

I removed those two blocks of code, and when I saved it - Dreamweaver warned me that there was a SPRY Validation code that was referencing a widget that is no longer there - so it says I need to remove it in order for the page to validate properly. So I removed the code that it pointed me to - which was this:

var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur"], minChars:5, maxChars:5});



And now the contact page will not let me submit a message. It asks the security question, but when I answer it correctly, it won't accept it. (tried many times). So I put that sprytextfield3 code back in, and tried it, and it does the same thing.

So I don't know what I removed to make this not work, but it's not working.

Here's the code - and this version is at the state after following your instructions. (removed the code you told me to, but not the spry text dw told me to). Can you look at it? Thanks

Attached Files
contactus.zip
Sign in to reply to this post

Jason ByrnesWebAssist

You can remove that line Dreamweaver is complaining about, but also change line 25:

php:
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_code"]))?strtolower($_POST["Security_question"]):"") . "",((isset($_SESSION["random_answer"]))?$_SESSION["random_answer"]:"") . "",true,5);





to:

php:
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_question"]))?strtolower($_POST["Security_question"]):"") . "",((isset($_SESSION["random_answer"]))?$_SESSION["random_answer"]:"") . "",true,5);
Sign in to reply to this post

larsentim278054

This worked great. Thanks!

Originally Said By: Jason Byrnes
  You can remove that line Dreamweaver is complaining about, but also change line 25:
php:
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_code"]))?strtolower($_POST["Security_question"]):"") . "",((isset($_SESSION["random_answer"]))?$_SESSION["random_answer"]:"") . "",true,5);




to:
php:
$WAFV_Errors .= WAValidateLE(((isset($_POST["Security_question"]))?strtolower($_POST["Security_question"]):"") . "",((isset($_SESSION["random_answer"]))?$_SESSION["random_answer"]:"") . "",true,5);
  
Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome

Sign in to reply to this post

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...