You are here: Re: Form re-population « All PHP « IT news, forums, messages
Re: Form re-population

Posted by Brian on 03/26/07 00:15

> Hello,
>
> on 03/21/2007 09:59 PM Brian said the following:
>> Just wondering if there is a better way of do this?
>>
>> I have a form that has one of those PHP anti-spam random images. If the
>> user
>> enters the incorrect
>>
>> number when they submit they get a error message and have to click back
>> to
>> re-enter it, the
>>
>> trouble is when they do all the fields on the form are now blank so they
>> have to type it all in again.
>>
>>
>>
>> So I was thinking, when the user submits the form it sets a cookie with
>> all
>> the forms info,
>>
>> it runs the tests to make sure the number is correct, if correct then
>> process the form and deletes the cookie.
>>
>> If it's not correct when the user clicks back put some code at the bottom
>> of
>> the form page that tests
>>
>> that the cookie is set and if there reads the info in and using
>> JavaScript
>> fills the form in.
>>
>> This is the only way I can think of, but it there a better way?
>
> Sure. what you need to do is to present and process the form in the same
> script.
>
> I use a forms generation and processing class that comes with a plug-in
> for CAPTCHA validation, which is the kind of human using validation you
> are using.
>
> The forms class takes that approach of using the same script to present
> and process the form. Here is a tutorial video explaining the why and
> how it works that way:
>
> http://www.phpclasses.org/browse/video/1/package/1/section/usage.html
>
> The form class is available here:
>
> http://www.phpclasses.org/formgeneration
>
> Here is a live example of the CAPTCHA validation plug-in:
>
> http://www.meta-language.net/forms-examples.html?example=test_captcha_input
>
> Here is the same tutorial video section about the CAPTCHA validation
> plug-in:
>
> http://www.phpclasses.org/browse/video/1/package/1/section/plugin-captcha.html
>
Hi Manuel

thanks for this, i have had a look and will have a play when i get time,
does look
an easyer way od doing things.

Brian




--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 1350 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация