Comments form

This is a discussion on "Comments form" within the Classic ASP section. This forum, and the thread "Comments form are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 26th, 2006, 11:47
Junior Member
Join Date: Jul 2006
Location: weymouth
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Comments form

Hi I have a comments form but the problem is it doesnt have validation so if the user doesnt enter any information it will still send to my email and also the user can click submit over and over which I would like rid of. Does anyone know the code to do this, I would be very grateful if someone could assist me. The url of the comments form is http://www.galaxywindows.co.uk/contact/form.html
, I have attached my code if anyone wants to look at it. Cheers
Many thanks
Attached Files
File Type: txt form(htmlcode).txt (1.3 KB, 77 views)
File Type: txt form_ac(aspcode).txt (1.6 KB, 29 views)

Last edited by jonbenitos; Jul 26th, 2006 at 11:50.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 30th, 2006, 18:05
Up'n'Coming Member
Join Date: Mar 2006
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Comments form

Hi I edited and tested your .asp file (I had to comment out the email part since my server doesn't use cdonts) to verify the data of the message field. It is always recommend that you test every field to ensure that correct data is being entered for various reasons including security.

The function I added will check the message to see if it is empty or that it contains the default message. The I add an if to not allow an email to be sent if the function returns a null value for the message. Pretty simple and can be modified if you wish to add more functionality.
Also I commented out the data conversion part of the function that changes certain characters that may conflict with a sql query since it doesn't apply here but you can use it to add conversions for character that may cause conflicts with your code.

As for the disabling it for awhile to avoid repeated entries I would suggest cookies or something similar but I don't have much experience in ths area.
Attached Files
File Type: txt form_ac.txt (2.7 KB, 51 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
comments, form

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Your comments please Remitrom Free Web Site Critique 6 Apr 8th, 2008 13:10
Some comments here please geyids Webforumz Cafe 2 Jan 14th, 2008 10:07
Need Some Comments Superman JavaScript Forum 10 Apr 8th, 2007 05:06
Comments form jonbenitos Classic ASP 0 Jul 26th, 2006 11:44


All times are GMT. The time now is 23:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42