Hej..
Jeg har forsøgt at lave en tagwall på
www.gimsing.net/Add.asp
Jeg aner bare ikke hvad der er galt...
Add.asp ser således ud... og den skriver fejl i linie 28.
<%
Response.Buffer = True
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
Response.Cookies("TagWall")("Name") = Request.Form("name")
Response.Cookies("TagWall")("Email") = Request.Form("Email")
Response.Cookies("TagWall")("Url") = Request.Form("Url")
Response.Cookies("TagWall").Expires = Date+365
End If
Name = Request.Cookies("TagWall")("Name")
Email = Request.Cookies("TagWall")("Email")
Url = Request.Cookies("TagWall")("Url")
%>
<%
Const adOpenKeyset = 1
Const adLockOptimistic = 3
tempConn = "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ="
& Server.MapPath("TagWall.mdb") & ";UID=admin;PWD=;"
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
Name = Trim(Request.Form("Name"))
Email = Trim(Request.Form("email"))
subject = Trim(Request.Form("subject"))
url = Trim(Request.Form("url"))
Body = Trim(Request.Form("Body"))
funimg = Trim(Request.Form("funimg"))
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM TagWall WHERE ID = 0"
rs.Open strSQL, tempConn, adOpenKeyset, adLockOptimistic
If (rs.BOF Or rs.EOF) Then
rs.AddNew
rs("Name") = Name
rs("email") = email
rs("subject") = subject
rs("url") = url
rs("Body") = Body
rs("funimg") = funimg
rs("Ip") = Request.ServerVariables("REMOTE_ADDR")
rs.Update
End If
rs.Close
Set rs = Nothing
End If
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
Response.Redirect("Default.asp")
End If
%>
<html>
<head>
<title>Add Message</title>
</head>
<body aLink="#FFFFFF" link="#FFFFFF" text="#FFFFFF" vLink="#FFFFFF"
style="font-family: Verdana" background="img/back.jpg">
<font color="#FFFFFF">
<p align="center"><img src="img/AddMessage.gif" WIDTH="208" HEIGHT="41"></p>
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script
Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.name.value == "")
{
alert("Please enter a value for the \"name\" field.");
theForm.name.focus();
return (false);
}
if (theForm.email.value == "")
{
alert("Please enter a value for the \"email\" field.");
theForm.email.focus();
return (false);
}
if (theForm.email.value.length > 75)
{
alert("Please enter at most 75 characters in the \"email\" field.");
theForm.email.focus();
return (false);
}
if (theForm.subject.value == "")
{
alert("Please enter a value for the \"subject\" field.");
theForm.subject.focus();
return (false);
}
if (theForm.subject.value.length > 75)
{
alert("Please enter at most 75 characters in the \"subject\" field.");
theForm.subject.focus();
return (false);
}
if (theForm.body.value == "")
{
alert("Please enter a value for the \"body\" field.");
theForm.body.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form
method="POST" action="Add.asp" onsubmit="return
FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
<dl>
<dd align="center"><div align="center"><center><table border="0"
cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"></td>
</tr>
<tr align="center">
<td><div align="left"><p></font><font color="#FFFFFF" size="2"
face="Verdana"><b>Name:</b></font></td>
<font><td><div align="left"><p><!--webbot bot="Validation"
B-Value-Required="TRUE" --><input name="name" size="30" style="font-weight:
bold; color: rgb(255,0,0); font-family: Verdana"
value="<%=Name%>"></font></td>
</tr>
<tr align="center">
<td><div align="left"><p><font color="#FFFFFF" size="2"
face="Verdana"><b>E-mail:</b></font></td>
<td><div align="left"><p><!--webbot bot="Validation"
B-Value-Required="TRUE" I-Maximum-Length="75" --><input name="email"
size="30" maxLength="75" style="color: rgb(255,0,0); font-weight: bold;
font-family: Verdana" value="<%=email%>"></td>
</tr>
<tr align="center">
<td><div align="left"><p><font color="#FFFFFF" size="2"
face="Verdana"><b>Subject:</b></font></td>
<td><div align="left"><p><!--webbot bot="Validation"
B-Value-Required="TRUE" I-Maximum-Length="75" --><input name="subject"
size="30" maxLength="75" style="font-weight: bold; color: rgb(255,0,0);
font-family: Verdana"></td>
</tr>
<tr>
<td><font color="#FFFFFF" size="2"
face="Verdana"><b>Homepage:</b></font></td>
<td><div align="left"><p><input type="text" name="Url" size="30"
style="font-weight: bold; color: rgb(255,0,0); font-family: Verdana"
value="<%=Url%>"><font face="Verdana" color="#FF0000"><strong><small>
Http://