Kode spiller ik
Hej,Hvad skal der til for at denne her kode spiller. Umiddelbart viser den ikke den tabel hvor mine forms ligger i. Og så ved jeg ikke hvordan jeg skal skrive linket i min formaction for at den skal smide det i databasen.
På forhånd tak
---------------------------------------------------
<%
topic = replace(request.form("topic"),"'","''")
body = replace(request.form("body"),"'","''")
bodyStr = replace(body,vbcrlf,"<br>")
author = request.form("nick")
email = request.form("email")
website = request.form("website")
err = 0
if author = "" then
err = 1
errormsg = "<br>Du skal skrive dit nick"
end if
if instr(email,"@") = 0 or instr(email,".") = 0 or email = "" then
err = 1
errormsg = errormsg + "<br>Email-adressen er ikke gyldig"
end if
if topic = "" then
err = 1
errormsg = errormsg + "<br>Du skal skrive et emne"
end if
if body = "" then
err = 1
errormsg = errormsg + "<br>Du skal skrive et tag :P"
end if
if err = 0 then
SQL = "insert into tagwall(author, website, email, topic, body, ip) values('"
SQL = SQL & author & "','"
SQL = SQL & email & "','"
SQL = SQL & topic & "','"
SQL = SQL & bodyStr & "','"
SQL = SQL & Request.ServerVariables("REMOTE_ADDR") & "')"
set RSinsert = conn.Execute(SQL)
if request.form("remember") = "true" then
Response.cookies("nick") = author
Response.Cookies("nick").Expires = Date+365
Response.cookies("email") = email
Response.Cookies("email").Expires = Date+365
end if
response.redirect("http://www.team-nopanic.dk/pages/communication.asp")
%>
response.write("<form name="form1" method="post" action="communication.asp"><input type="hidden" name="mode" value="insert">")
<table width="545" cellpadding="5" class="updown">
<tr>
<td width="167">Dit navn: <span class="style1">*</span> </td>
<td width="350"><input name="author" type="text" value="<% response.write(" "& RS("author")&" ")%>" class="textfield"></td>
</tr>
<tr>
<td>Din email: <span class="style1">*</span> </td>
<td><input name="email" type="text" class="textfield" id="email" value="<% response.write(" "& RS("email")&" ")%>"></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="text10">
<tr>
<td width="130">Dit website: </td>
<td width="37"><span class="style4">http://</span></td>
</tr>
</table></td>
<td><input name="website" type="text" class="textfield" id="website" value="<% response.write(" "& RS("website")&" ")%>"></td>
</tr>
<tr>
<td>Overskrift: <span class="style1">*</span></td>
<td><input name="topic" type="text" class="textfield" id="topic" value="<% response.write(" "& RS("topic")&" ")%>"></td>
</tr>
<tr>
<td valign="top">Indlæg: <span class="style1">*</span></td>
<td><textarea name="body" class="textbox" id="body" value="<% response.write(" "& RS("body")&" ")%>"></textarea></td>
</tr>
<tr><%response.write(" "&errormsg&"")%>
<td height="37" valign="middle">Husk info<br>
<span class="style3">(Cookies)</span></td>
<td valign="top"><input type="checkbox" name="remember" value="true">
</td>
</tr>
<tr>
<td> </td>
<td><input name="Submit" type="submit" class="agree" value="Tilføj indlæg"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<br></td>
</tr>
</table>
</td>
</tr>
</table>
<%end if%>