form and confirmation not working

M

marc

Beginner Be Gentle. Don't know if I've got Hostserver problems or if I've
missed a step or two. My feedback form does not send info to database on
server and does not send confirmation page.
On server I have Windows Shared Hosting with frontpage Extensions, HTML,
DMTML, SHTML, XML, Access Database support, ASP, ASP.NET v1.0/2.0, ASP.NET
AJAX, MSSQL Database Support (SQL Server). Although I've never set any of
these up.
Here is my feedback page code, all I changed is the name of website in Title
and in form method name, to,?????.com:
<%
' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Session.LCID = 1033
Err.Clear

strErrorUrl = ""

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "1" Then
Err.Clear

Set fp_conn = Server.CreateObject("ADODB.Connection")
FP_DumpError strErrorUrl, "Cannot create connection"

Set fp_rs = Server.CreateObject("ADODB.Recordset")
FP_DumpError strErrorUrl, "Cannot create record set"

fp_conn.Open Application("feedback_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"

fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic,
adCmdTable
FP_DumpError strErrorUrl, "Cannot open record set"

fp_rs.AddNew
FP_DumpError strErrorUrl, "Cannot add new record set to the database"
Dim arFormFields1(9)
Dim arFormDBFields1(9)
Dim arFormValues1(9)

arFormFields1(0) = "Telephone"
arFormDBFields1(0) = "Telephone"
arFormValues1(0) = Request("Telephone")
arFormFields1(1) = "Title"
arFormDBFields1(1) = "Title"
arFormValues1(1) = Request("Title")
arFormFields1(2) = "Company"
arFormDBFields1(2) = "Company"
arFormValues1(2) = Request("Company")
arFormFields1(3) = "FAX"
arFormDBFields1(3) = "FAX"
arFormValues1(3) = Request("FAX")
arFormFields1(4) = "Email"
arFormDBFields1(4) = "Email"
arFormValues1(4) = Request("Email")
arFormFields1(5) = "Name"
arFormDBFields1(5) = "Name"
arFormValues1(5) = Request("Name")
arFormFields1(6) = "Address"
arFormDBFields1(6) = "Address"
arFormValues1(6) = Request("Address")
arFormFields1(7) = "Category"
arFormDBFields1(7) = "Category"
arFormValues1(7) = Request("Category")
arFormFields1(8) = "Comments"
arFormDBFields1(8) = "Comments"
arFormValues1(8) = Request("Comments")

FP_SaveFormFields fp_rs, arFormFields1, arFormDBFields1

If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"),
"Browser_type"
End If
If Request.ServerVariables("REMOTE_HOST") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"),
"Remote_computer_name"
End If
FP_SaveFieldToDB fp_rs, Now, "Timestamp"
If Request.ServerVariables("REMOTE_USER") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
End If

fp_rs.Update
FP_DumpError strErrorUrl, "Cannot update the database"

fp_rs.Close
fp_conn.Close

Session("FP_SavedFields")=arFormFields1
Session("FP_SavedValues")=arFormValues1
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.Redirect "confirmation.asp"

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">

<title>WWW.????????.COM Feedback Page</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Theme" content="copy-of-balance2 1011">
<meta name="Microsoft Border" content="tlb, default">
</head>

<body >



<p> <font size="6"><span style="background-color: #000000">Please tell us
what you think about our web site, company, or services. If you provide us
with your
</span>
</font></p>
<p> <font size="6"><span style="background-color: #000000">contact
information, we will be able to reach you in case we have any
questions.</span></font></p>

<form method="POST" action="--WEBBOT-SELF--" onSubmit=""
enctype="text/plain" name="????.com comments response">

<!--webbot bot="SaveDatabase" S-Builtin-Fields="HTTP_USER_AGENT REMOTE_HOST
Timestamp REMOTE_USER" startspan SuggestedExt="asp"
S-DataConnection="feedback" S-RecordSource="Results"
U-Database-URL="fpdb/feedback.mdb" S-Builtin-DBFields="Browser_type
Remote_computer_name Timestamp User_name" S-Form-Fields="Telephone Title
Company FAX Email Name Address Category Comments" S-Form-DBFields="Telephone
Title Company FAX Email Name Address Category Comments"
U-ASP-Include-Url="_fpclass/fpdbform.inc"
U-Confirmation-Url="confirmation.asp" --><input TYPE="hidden"
NAME="VTI-GROUP" VALUE="1"><!--#include
file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan
i-checksum="40580" -->

<p> <!--webbot
bot="PurpleText"
preview="The results of this form are stored in the file
'_private/inforeq.htm' in your web. You can edit this file using FrontPage,
or view and print it from any web browser." --></p>

<h3><span style="background-color: #000000">Comments</span></h3>
<blockquote>
<p><textarea name="Comments" rows="10" cols="45"></textarea> </p>
</blockquote>
<h3><span style="background-color: #000000">Category</span></h3>
<blockquote>
<p><select name="Category">
<option selected>Web site</option>
<option>Company</option>



<option>Services</option>


</select> </p>
</blockquote>
<h3><span style="background-color: #000000">Contact
Information</span></h3>
<table>
<tr><td align="right"><em><span style="background-color:
#000000">Name</span></em></td><td><input type="TEXT" name="Name" value
size="35"></td></tr>
<tr><td align="right"><em><span style="background-color:
#000000">Title</span></em></td><td><input type="TEXT" name="Title" value
size="35"></td></tr>
<tr><td align="right"><em><span style="background-color:
#000000">Company</span></em></td><td><input type="TEXT" name="Company" value
size="35"></td></tr>
<tr><td align="right"><em><span style="background-color:
#000000">Address</span></em></td><td><input type="TEXT" name="Address" value
size="35"></td></tr>
<tr><td align="right"><em><span style="background-color:
#000000">Telephone</span></em></td><td><input type="TEXT" name="Telephone"
value size="35"></td></tr>
<tr><td align="right"><em><span style="background-color:
#000000">FAX</span></em></td><td><input type="TEXT" name="FAX" value
size="35"></td></tr>
<tr><td align="right"><em><span style="background-color:
#000000">E-mail</span></em></td><td><input type="TEXT" name="Email" value
size="35"></td></tr>
</table>
<p><input type="SUBMIT" value="Submit
Feedback"> <input
type="RESET" value="Reset Form"> </p>
</form>
 
R

Ronx

A form name cannot contain spaces or dots - it must be alphanumeric only,
but _underline can also be used.
name="????.com comments response" should be
name="comments_response"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top