close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Form security question validation triggering even when it shouldn't

Thread began 9/14/2021 11:51 am by Justin@AdventDesign | Last modified 9/15/2021 9:33 am by Ray Borduin | 449 views | 7 replies |

Justin@AdventDesign

Form security question validation triggering even when it shouldn't

On the attached page, I'm having a problem with the security question. I wanted to drop the Captcha and just use the random question so I commented out both the Captcha element and the validation code. However, the security question is already triggered on page load, and even though I enter the correct answer, it still triggers as incorrect no matter what I do.

Attached Files
service.php
Sign in to reply to this post

Ray BorduinWebAssist

Try adding this right before the <!Doctype> tag:

php:
<?php

@session_start();
?>
Sign in to reply to this post
Did this help? Tips are appreciated...

Justin@AdventDesign

Now it passes with the correct answer, but for some reason the validation message for the security question is showing on page load, not only after submitting. Could that have something to do with commenting out the Captcha?

Here's the page live: http://www.moyerelectric.net/estimate/res/service.php

Sign in to reply to this post

Ray BorduinWebAssist

Try moving the session start code above the validation below the two require_once lines.

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

Justin@AdventDesign

That didn't seem to make a difference. Since I commented out the one validation, it was skipping a number in that numerical order. I tried changing that validation to "11" rather than "12" so it wouldn't skip from 10 to 12. It seems to be working now. Would skipping a number in the validation by commenting out cause an issue like that? Seems to just be an ID number but it's working now.

Sign in to reply to this post

Justin@AdventDesign

One last quick question... how do I display a conditional message on the page when the page returns with the invalid variable in the URL? I'd like to include a general message at the top when there are corrections that need to be made. Seems like I recall doing that before but I can't find where or how.

Sign in to reply to this post

Ray BorduinWebAssist

You can use:

php:
<?php

if (isset($_GET["invalid"])) {
?>
One or more entry is invalid
<?php
}
?>
Sign in to reply to this post
Did this help? Tips are appreciated...

Justin@AdventDesign

Thanks Ray. That worked well.

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