[Pro] PHP feedback and captcha :help

Hello everyone,

I’ve used php feedback page action, which works very well. Now I want to use a captcha-script from (Securimage PHP Captcha | Quickstart Guide). There is said to put the code AFTER the error-cheking, but we me nothing works. So where to put this code in a standard contact-go.php file?

“<?php session_start(); ?>” // on top of page//

"include_once $_SERVER[‘DOCUMENT_ROOT’] . ‘/securimage/securimage.php’;

$securimage = new Securimage(); "

// This php code should be integrated into the script that processes your form and should be placed where error checking is done. It is recommended to place it after any error checking and only attempt to validate the captha code if no other form errors occured //

“if ($securimage->check($_POST[‘captcha_code’]) == false) {
echo “The security code entered was incorrect.

”;
echo “Please go back and try again.”;
exit;
}”
//Make sure you check the code BEFORE the form is emailed or entered into a database and only if there were no other form errors.//

anyone an idea? (As you should have noticed i’ve no php knowledge what so ever)

Thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Your problem with this sort of integration is that the contact-go.php file is created automatically every time you publish the page.

Any rewrite of it will be rewritten by the action on publish.

It may be possible to modify the contact-go and then remove the action and then set up the Form to post to the modified version but I cant help feeling that you may be better off using MikeB’s easiform that is designed for Captcha integration http://easibase.com/freeway/freeway_captcha.php - especially if you are PHP challenged.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi, a bit late, but it’s solved and working.
Just put the code on top of the contact-go file. But of course, everytime you work on the site and publish it again, you have to put it in manualy.

The old fashioned way of things.

Thanks for your interest.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just put the code on top of the contact-go file.

If this is what you have done then save that contact-go file as something else ie formhandler.php

Now remove the action from the item/page and go into Page>Form Setup and use Method:Post and put path/to/formhandler.php into the Action field.

Use an action like Upload Stuff (or FTP) to get the file onto your server in the correct place and you will never have to change the file again because it will be out of the FW loop and not touched on publish.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options