This is a discussion on "Securing Web Forms" within the JavaScript Forum section. This forum, and the thread "Securing Web Forms are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Securing Web Forms
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Securing Web Forms
Hi everyone, this is my first post. I am a complete beginner at web design as I come from a networking background. This last week or two I have been asked to do some work on a website so I thought I'd give it a go. I have been asked to set up a secure web form that will send the contents of the form entered by the user to an email address selected from a drop down menu on the page. I managed to get the form working and sending email but when I added Captcha to the page it seemed to work i.e it checked if the user had enetered the correct number then it would go onto the thank you page but it would not send the email now. The emails were sending fine before I added the Captcha. I did some research into this and found out that because there was echos in my Captcha validation code it was preventing the email from sending. I have been pulling my hair out trying different methods this past week. I was wondering if anyone on here could give me some advice or maybe an alternative way to do this? If it is easier I can post my code.
Thanks in advance guys |
|
|
|
|||
|
Re: Securing Web Forms
Write JavaScript to carry out validation at the client end for quickness and convenience for the user but you absolutely MUST do it again at the server side if for no other reason than they might have JavaScript turned 'off'.
Validating at the client side will not effect data in your form fields. However, once you send the data server side for validation and processing, if you return the user to the same page on failed validation, the fields will be empty unless you take steps to create 'sticky data'. You do this by making the value attribute of a field equal to some php variable (usuming php is your server side scripting language) that has been used in the validation/processing script. |
![]() |
| Tags |
| captcha |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Securing test enviroment | Spartan0510 | PHP Forum | 6 | Nov 15th, 2007 15:51 |
| JS and Forms | roki13 | JavaScript Forum | 1 | Jun 6th, 2007 15:28 |
| securing email scripts from spam | maniac | Classic ASP | 1 | Nov 16th, 2006 12:08 |
| forms | mickc90 | PHP Forum | 3 | Aug 1st, 2006 22:06 |
| idea for "securing" Robs FormFunction | jakyra | Classic ASP | 9 | Sep 9th, 2003 16:56 |