Redirecting user to if Captcha image text doesnt match

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dumlee
Forum Commoner
Posts: 33
Joined: Mon Jun 30, 2008 12:06 am

Redirecting user to if Captcha image text doesnt match

Post by dumlee »

If the text entered by user in Text box does not match with the text shown in Image (Text in Image is Some Session data).

Then how to to redirect him after checking it on server end and then populating all fields with their previous values.
koen.h
Forum Contributor
Posts: 268
Joined: Sat May 03, 2008 8:43 am

Re: Redirecting user to if Captcha image text doesnt match

Post by koen.h »

You could set the values from the form fields as session data. Then after you redirected (?) put it in again.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Redirecting user to if Captcha image text doesnt match

Post by Benjamin »

If you're posting the data to the same page that displays the form, you wouldn't need to redirect. You could simply redisplay the form with the appropriate error messages. Normally what I do is redirect only if validation is successful.
Post Reply