View Full Version : Form won't post to database.

03-25-2007, 04:39 AM
Hi there - I need some help with my code if you all might be so kind. :) Here is the scope - I have created a 2 page database app that will create and show work orders when I create them. I am currently running this on my home IIS but will be getting ready to upload to my web server. See the first page - I had it posting to the database, but now since I have created the second page that displays the results of the database - the posting page won't post.

Here is the code of the posting page (can you show me what I am doing wrong? Please bear in mind I am somewhat programming challenged as I do not speak tech in this way. So please make your explanation easy to follow if you could.

Okay - here is my code for my form page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Ekho3 Technology Work Orders</title>
<style type="text/css">
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
<script language="JavaScript" type="text/JavaScript">
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
<link href="style/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
a:link {
color: #000000;
a:hover {
color: #990000;
a:visited {
color: #000000;

<form action="changerequests.asp" method="post" name="workorders" id="workorders">
<p class="heading">Ekho3 Technology Work Order Request </p>
<p><a href="changeorderresults.asp">Change Order Results</a> </p>
<div id="lrsenddata" style="position:absolute; width:200px; height:115px; z-index:1; left: 467px; top: 60px;" class="aspfont">
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "C:/Inetpub/wwwroot/ekho3/WorkOrders/workorders.mdb"

sql = "INSERT INTO workorder (clientname, mdate, workordernumber, priority, datedue, approval, designtime, description, completed, completiondate, hoursused, followupnotes) VALUES ('" & Request.Form("clientname") & "','" & Request.Form("mdate") & "','" & Request.Form("workordernumber") & "','" & Request.Form("priority") & "','" & Request.Form("datedue") & "','" & Request.Form("approval") & "','" & Request.Form("designtime") & "','" & Request.Form("description") & "','" & Request.Form("completed") & "','" & Request.Form("completiondate") & "','" & Request.Form("hoursused") & "','" & Request.Form("followupnotes") & "')"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
<table border="0" cellpadding="4" cellspacing="0">
<td valign="top">Client Name: </td>
<td><select name="clientname" id="clientname">
<option value="Bella Vista Church">Bella Vista Church</option>
<option value="Betty Rummel">Betty Rummel</option>
<option value="CD McDonald">CD McDonald</option>
<option value="Crossroads Church">Crossroads Church</option>
<option value="Data Specialists">Data Specialists</option>
<option value="Ekho3 Photography">Ekho3 Photography</option>
<option value="Ekho3 Technology">Ekho3 Technology</option>
<option value="Front Door Realty">Front Door Realty</option>
<option value="GoZabo.com">GoZabo.com</option>
<option value="Jeffrey Parker Architect">Jeffrey Parker Architect</option>
<option value="Judy Williams">Judy Williams</option>
<option value="Kim Selesky">Kim Selesky</option>
<option value="Klackle Orchards">Klackle Orchards</option>
<option value="Mari-Mar Antiques">Mari-Mar Antiques</option>
<option value="Merritt Auction Services">Merritt Auction Services</option>
<option value="Merrill & Margaret Russell">Merrill &amp; Margaret Russell</option>
<option value="Micro Visions, Inc.">Micro Visions, Inc.</option>
<option value="MVI - Bright Technologies">MVI - Bright Technologies</option>
<option value="MVI - Burns Contracting">MVI - Burns Contracting</option>
<option value="MVI - Ed Young, DDS.">MVI - Ed Young, DDS.</option>
<option value="MVI - Heather Lane Pottery">MVI - Heather Lane Pottery</option>
<option value="MVI - John Tamboer">MVI - John Tamboer</option>
<option value="MVI - Sebright Products">MVI - Sebright Products</option>
<option value="MVI - Tyrone Township">MVI - Tyrone Township</option>
<option value="MVI - United Electric">MVI - United Electric</option>
<option value="Michigan Fundraising">Michigan Fundraising</option>
<option value="Pique, LLC.">Pique, LLC.</option>
<option value="Robin & Patrick Strong">Robin &amp; Patrick Strong</option>
<option value="Rockford Package Supply">Rockford Package Supply</option>
<option value="Russell Siding">Russell Siding</option>
<option value="Sow Hope">Sow Hope</option>
<option value="The Studio Salon">The Studio Salon</option>
<option value="The Gameroom Guys">The Gameroom Guys</option>
<option value="Thomas Home Interiors">Thomas Home Interiors</option>
<option value="Trinitas Classical School">Trinitas Classical School</option>
<option value="Turk Lake Auto Sales">Turk Lake Auto Sales</option>
<option value="Wise Photography">Wise Photography</option>
<td valign="top">Date: </td>
<td><input name="mdate" type="text" id="mdate" size="27"></td>
<td valign="top">Priority Level: </td>
<td><select name="priority" id="priority">
<option value="1 - Urgent (ASAP)">1 - Urgent (ASAP)</option>
<option value="2 - High (2 Days)">2 - High (2 Days)</option>
<option value="3 - Medium (1 Week)" selected>3 - Medium (1 Week)</option>
<option value="4 - Low (2 Weeks)">4 - Low (2 Weeks)</option>
<option value="5 - Pending Contact">5 - Pending Contact</option>
<td valign="top">Approved: </td>
<td><select name="approval" id="approval">
<option value="Approved" selected>Yes</option>
<option value="Not Approved">No</option>
<td valign="top">Estimated Design Time: </td>
<td><input name="designtime" type="text" id="designtime" size="8">
Hrs. </td>
<td valign="top">Job Desciption: </td>
<td><textarea name="description" cols="45" rows="6" id="description"></textarea></td>
<td valign="top">Completed: </td>
<td><select name="completed" id="completed">
<option value="Completed">Yes</option>
<option value="Not Completed" selected>No</option>
<td valign="top">&nbsp;</td>
<td><div align="right">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">

Thank you for all of your help!! :)

03-25-2007, 04:43 AM
Not sure if I mentioned, but the form was working fine until I created the second page that shows me the results of the database. Now it won't work. I don't understand if something in this second page screwed things up for the first. I am coding in Dreamweaver too.