close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

why is my captcha not working?

Thread began 9/15/2015 8:29 am by russell298997 | Last modified 12/07/2015 12:04 pm by Ray Borduin | 3814 views | 16 replies |

russell298997

why is my captcha not working?

hi guys, thought i'd followed the instructions to the letter but the form uploads even if nothing in captcha box. it is set to "like entry".....any idea what im doing wrong? file is teacher-registration.php

Sign in to reply to this post

Ray BorduinWebAssist

The form action is set to: teachers_register_complete.php

That is the page that would need captcha validation and is processing the file upload. The server validation on this page never runs since the form is submitted to another page.

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

Ray BorduinWebAssist

This post has been deleted.


Did this help? Tips are appreciated...

russell298997

so i set up the same validation etc but on the form receiving page yep?

Just looking at it now - if I try to do that it doesnt make sense to me that I can set the server variable as$_SESSION['captcha_Security_Code_1'], but a) does the trigger need to be "before page load", as I'm not submitting a form on the receiving page (teacher_registration_complete.php), and I seem to have nothing to compare the variable to as the form field isnt on this page, its on the previoous page.

How do I complete the process - I just want that the initial page form doesnt send if the captcha is incorrect....and the user is requested to try again? like usually happends on web pages?? do i need ot restructure the workflow completely here? the idea is they complete the form and submit, an email is triggered with content, to the client, with attached CV file (plus i will want to add inserting the record into a database table. but i want for that NOT to happpen is the captcha is invalid...?

thanks for your help as ever Ray

So I guess I have to put the captcha on the recieiving page too, rather than the initial page? but the form is going to send anyway on loading so it wouldnt work. i'm confused! there must be a simpler way to

Sign in to reply to this post

Ray BorduinWebAssist

Change the form action to teacher-registration.php and then you can do everything on that page and just redirect to the teacher_registration_complete.php page when you apply the email server behavior on the page by setting the success redirect.

You could also simply copy and paste the code you already have on the top of the teacher_registration_complete.php page and do the validation and processing on that page. The only line you would have to update would be line 6 to:
$WAFV_Redirect = "teacher_registration.php";

The form from the other page won't show up in the bindings by default, but you can go to the bindings tab on the complete page and click the plus button and choose "Form Data" and put in the teacher_registration page to have it's form elements display as available.

You don't need to upload the file at all. The email server behavior has an option to add it as an attachment and send it from a file field without ever storing it on your server. You can also apply the email on the same page as the file upload and/or server validation. The server validation will prevent it from sending .

Form element values are only available on the page set as the action page of the form. That is where they are submitted to. The server validation, file upload, and email server behaviors should be applied on the same page (the form action page). That can either be the same page as the form is on, or another page as long as it is the page specified as the action. If you do use the same page, then you can use the go to page setting in the email to go to the next page after the email is sent.

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

russell298997

Further help required!

Hi Ray,
Further to above, have added the email behaviour to the teacher-registration page successfully. Added the file attachment fine and removed the unneeded file upload behaviour. EMails triggering fine, but I cannot, for the love of god, get this captcha to work. It just seems to let the form send whatever. Have tried to follow your guide, and form action is pointing at teacher-registration.php but it wont validate. Also, I added a quick "incorrect" SHOW IF FAILS behaviour and that shows on the page regardless.

Pleeeease! Where am I going wrong. So need to put this to bed :)

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

Ray BorduinWebAssist

Everything appears to be applied correctly. If you can give me a url for testing and FTP access I can debug it and let you know what the problem was.

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

russell298997

thanks mate

Sign in to reply to this post

Ray BorduinWebAssist

It appears the CAPTCHA is working... you just don't have a success redirect, so it is hard to tell the difference... however I'm pretty sure the registration email isn't sent unless the CAPTCHA is correct.

I think the changes you need to make to allow this to work more smoothly is to add a success or failure message to the very top of the form and add validated form bindings to the existing fields so they maintain their values when the CAPTCHA fails.

I've gone ahead and made those changes for you... Please download the updated file I've made the additions to.

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

russell298997

THanks - where do i find the updated file download??

Sign in to reply to this post
loading

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