Forum Moderators: open
<html>
<head></head>
<title></title>
<!-- #include file="open.asp" -->
<%
If Request.Form("submit") = "Add" OR Request.Form("submit") = "Delete" Then
If Request.Form("submit") = "Add" Then
strSQL = "INSERT INTO tblEmployers (firstName, lastName, companyName, emailAddress, password) " & _
"VALUES ('"&Request.Form("firstName")&"', '"&Request.Form("lastName")&"', '"&Request.Form("companyName")&"', '"&Request.Form("emailAddress")& _
"', '"&Request.Form("password")&"')"
End If
If Request.Form("submit") = "Delete" Then
strSQL = "DELETE FROM Solicitations WHERE solID="&Request.Form("ID")&";"
End If
Set objAdd = Server.CreateObject("ADODB.Command")
objAdd.ActiveConnection = strConn
objAdd.CommandText = strSQL
objAdd.Execute
Set objAdd = Nothing
'Response.write(strSQL)
End If
%>
<form method="post" action="trial2.asp">
<table cellspacing="0" cellpadding="3" border="0">
<tr>
<th>First Name</th>
<td><input type="text" size="50" name="firstName" ></td>
</tr>
<tr>
<th>Last Name</th>
<td><input type="text" size="50" name="lastName" ></td>
</tr>
<tr>
<th>Company Name</th>
<td><input type="text" size="50" name="companyName"></td>
</tr>
<tr>
<th>Email Address</th>
<td><input type="text" size="50" name="emailAddress"></td>
</tr>
<tr>
<th>Password</th>
<td><input type="text" size="50" name="password"></td>
</tr>
<tr>
<td width="100%" colspan="2"><div align="center"><input type="submit" value="Add" name="submit"> <input type="submit" value="Delete" name="submit"></div></td>
</tr>
</table></form></div>
<!-- #include file="close.asp" -->
</body>
</html>
SWiG