Kode der ikke helt spiller!
Hi eksperter,Hvad skal der til før at denne kode spiller?
Det skal lige siges at jeg ikke bruger nogle form for getmode eller lignende.
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 & website & "','"
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?page=6&mode=addtag'><input type='hidden' name='mode' value='insert'>")
%>
<table width="545" cellpadding="5" class="updown">
<tr>
<td width="110">Dit navn: <span class="style3">*</span> </td>
<td width="407"><input name="textfield" type="text" id="nick" value="<% response.write(" "& RS("author")&" ")%>" class="textfield"></td>
</tr>
<tr>
<td>Din email: <span class="style3">*</span> </td>
<td><input name="textfield2" type="text" id="email" value="<% response.write(" "& RS("email")&" ")%>" class="textfield"></td>
</tr>
<tr>
<td>Dit website: </td>
<td><input name="textfield3" type="text" id="website" value="<% response.write(" "& RS("website")&" ")%>" class="textfield"></td>
</tr>
<tr>
<td>Overskrift: <span class="style3">*</span></td>
<td><input name="textfield4" type="text" id="topic" value="<% response.write(" "& RS("topic")&" ")%>" class="textfield"></td>
</tr>
<tr>
<td valign="top">Indlæg: <span class="style3">*</span></td>
<td><textarea name="textarea" id="body" value="<% response.write(" "& RS("body")&" ")%>" class="textbox"></textarea></td>
</tr>
<tr>
<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%>