ASP Question

by "Graphmaster Design" <jh(at)graphmaster.com>

 Date:  Wed, 7 Apr 2004 15:14:26 -0600
 To:  "'HWG Techniques'" <hwg-techniques(at)hwg.org>
 In-Reply-To:  Smart
  todo: View Thread, Original
I have an ASP form and would like to make some of the fields required.
I am attaching the code below.  If someone could tell me how to make the
fields required I would greatly appreciate it!

Thanks so much!
Juliana

 <% 
dim first
first = request.form("first")
if first <> "" then
 
	Dim fname, lname, email, comment, usertype
	
	fname = Request.Form("fname")
	lname = Request.Form("lname")
	email = Request.Form("email")
	comment = replace(Request.Form("comments"), "'", "")
	usertype = Request.Form("usertype")
	
	
	 
	dim AddStoreSQL	  
	
	AddStoreSQL="Insert into Kreb_Dropusline (dropusline_fname,
dropusline_lname, dropusline_email, dropusline_comment, dropusline_type,
dropusline_datetime) Values ('" & fname & "' , '" & lname & "' , '" &
email & "' , '" & comment & "' , '" &  usertype & "' , ' " & date() +
time() & "');"
	
	adoConn.Execute(AddStoreSQL)
	%> <%
	Dim MyBody
    Dim MyCDONTSMail

    Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
    MyCDONTSMail.From= "Christmas by Krebs"
    MyCDONTSMail.To= "info(at)graphmaster.com"
    MyCDONTSMail.Subject= "Christmas By Krebs - Drop Us A Line"
    MyBody = "Thank you for contacting us, " & fname & " " & lname & "!"
& vbCrLf 
	MyBody = MyBody & "Date: " & date() + time() & vbCrLf 

	MyBody = MyBody & "Type: " & usertype & vbCrLf 
	MyBody = MyBody & "Email: " & email & vbCrLf 
	MyBody = MyBody & "Comment: " & comment & vbCrLf  
	
    MyCDONTSMail.Body= MyBody
    MyCDONTSMail.Send
    set MyCDONTSMail=nothing
	%>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA