HTML form
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Client Service</title>
<style type="text/css">
<!--
.style1 {font-weight: bold}
.style2 {font-weight: bold; }
body {
background-color: #0000CC;
background-image: url();
}
.style3 {
font-size: x-large;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
}
.style4 {font-size: xx-large}
body,td,th {
color: #FFFFFF;
}
-->
</style>
</head>
<body>
<form action="access.asp" method="post""script="javascript">
<div align="left">
<p align="center" class="style3 style4">Earn Intense Customer Loyalty </p>
<p align="center">
<br>
<br>
<span class="style1">First Name: </span>
<input type="text" size="30"
maxlength="50" name="First_Name">
<span class="style1">Last Name:
<input type="text" size="30" maxlength="50" name="Last_Name">
</span> <br>
<br>
<!--Division-->
<strong>Division:</Strong> <select id="Division" name="Division">
<option value="Boston">Boston</option>
<option value="California">California</options>
<option value="Florida">Florida</options>
</select>
<br>
<br>
<!--Supervisor-->
<strong>Supervisor:</strong>
<select id="Supervisor" name="Supervisor">
<option value="Brenda Laurenza">Brenda Laurenza</option>
</select>
<br>
<br>
<strong>Client Name </strong>:
<input type="text" name="client" size="100">
<br>
<br>
<span class="style2"><strong>Client Type: </strong></span>
<select id="Client_type" name="Client_type">
<option value="owner">Owner</option>
<option value="architect">Architect</option>
<option value="sub">Subcontractor</option>
<option value="suffolk">abc</option>
<option value="other">Other</option>
</select>
<br>
<br>
<!--<span class="style2"><strong>If Other Specify: </strong></span>
<textarea name="ios" cols="50" rows="4"></textarea>-->
<br>
<br>
<span class="style2"><strong>How did you support Goal #2: </strong></span>
<textarea name="eicl" cols="100" ></textarea>
<br>
<br>
<input type="submit" value="Submit Form" name="Submit"align="middle">
</p>
</div>
</form>
</body>
</html>
ASP form
<!-- #include virtual="/includes/adovbs.inc" -->
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("/goal2.mdb") & ";"
objConn.Open
%>
<%
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "Goal2", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
objRS.AddNew
objRS("Division")=Request.Form("Division")
objRS("First_Name")=Request.Form("First_Name")
objRS("Last_Name")=Request.Form("Last_Name")
objRS("Supervisor")=Request.Form("Supervisor")
objRS("Client")=Request.Form("Client")
objRS("client_Type")=Request.Form("Client_Type")
objRS("eicl")=Request.Form("eicl")
objRS.update
objRS.Close
Set objRS=Nothing
objConn.Close
Set objConn=Nothing
%>
<%
Response.Write("<b>Thank you for submitting your Building Intense Customer Loyalty entry</b>")
%>
this is the two forms i am using. and i want for example the first name to be blank that they dont have to put that in, but if they try to submitt it when its blank it bounces back with error that authorisation erro.