Response.redirect
Jeg kan ikke få min asp side til at redirecte efter man har skrevet sit info ind i databasen... Der sker bare ikke en skid... Jeghar sat mit asp med i denne besked.....If Request.Servervariables("Twat1") > 0 then
Sql = "Insert into qa (Fra, Twat, email, webside, Besked) values(''" & Request("Fra") & "'',''" & Request("Twat") & "'',''" & Request("email") & "'',''" & Request("webside") & "'',''" & Request("Besked") & "'')"
Rs.Execute(Sql)
response.redirect( "http://www.dfu.dk" )
--------
Og det hele :<!--#include file = "header.inc"-->
<%
Set Rs = Server.CreateObject("ADODB.Connection")
DBPath = "DBQ=" & server.mappath("email.mdb")
Rs.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & DBPath
If Request.Servervariables("Content_Length") > 0 then
Sql = "Insert into t_gaestebog (Dato, email) values(''" & Now() & "'',''" & Request("email") & "'')"
Rs.Execute(Sql)
Response.Write strongfont & "Thanks.. could you take the time?</font></Strong><br><br>"
response.write "<form method=''POST'' action=''" & Request.ServerVariables("Twat1") & "''>"
response.write "<div align=''left''><table border=''0'' width=''50%''>"
response.write "<tr><td valign=''top'' align=''right'' colspan=''2'' bgcolor=''" & linecolor & "''></td></tr>"
response.write "<tr><td valign=''top'' align=''right''>" & font & "Navn:</td>"
response.write "<td valign=''top''>" & font & "<input type=''text'' name=''Fra'' size=''40''></td></tr>"
response.write "<tr><td valign=''top'' align=''right''>" & font & "Twat:</td>"
response.write "<td valign=''top''>" & font & "<input type=''text'' name=''Twat'' size=''40''></td></tr>"
response.write "<tr><td valign=''top'' align=''right''>" & font & "E-Mail:</td>"
response.write "<td valign=''top''>" & font & "<input type=''text'' name=''email'' size=''40''></td></tr>"
response.write "<tr><td valign=''top'' align=''right''>" & font & "Webside:</td>"
response.write "<td valign=''top''>" & font & "<input type=''text'' name=''webside'' size=''40'' value=''http://''></td></tr>"
response.write "<tr><td valign=''top'' align=''right''>" & font & "Besked:</td>"
response.write "<td valign=''top''>" & font & "<textarea rows=''5'' name=''Besked'' cols=''40''></textarea></td></tr>"
response.write "<tr><td colspan=''2'' valign=''top'' align=''right''><div align=''center''><center><p>" & font & "<input type=''submit'' value=''Send'' name=''B1''> <input type=''reset'' value=''Slet'' name=''B2''></td></tr>"
response.write "<tr align=''center''><td colspan=''2'' valign=''top'' align=''right'' bgcolor=''" & linecolor & "''></td></tr></table>"
end if
If Request.Servervariables("Twat1") > 0 then
Sql = "Insert into qa (Fra, Twat, email, webside, Besked) values(''" & Request("Fra") & "'',''" & Request("Twat") & "'',''" & Request("email") & "'',''" & Request("webside") & "'',''" & Request("Besked") & "'')"
Rs.Execute(Sql)
response.redirect( "http://www.dfu.dk" )
end if
If "add" = Request.QueryString("Mode") then
response.write strongfont & "Write your email</strong>"
response.write "<form method=''POST'' action=''" & Request.ServerVariables("SCRIPT_NAME") & "''>"
response.write "<div align=''left''><table border=''0'' width=''50%''>"
response.write "<tr><td valign=''top'' align=''right'' colspan=''2'' bgcolor=''" & linecolor & "''></td></tr>"
response.write "<tr><td valign=''top'' align=''right''>" & font & "E-Mail:</td>"
response.write "<td valign=''top''>" & font & "<input type=''text'' name=''email'' size=''40''></td></tr>"
response.write "<tr><td colspan=''2'' valign=''top'' align=''right''><div align=''center''><center><p>" & font & "<input type=''submit'' value=''Send'' name=''B1''> <input type=''reset'' value=''Slet'' name=''B2''></td></tr>"
response.write "<tr align=''center''><td colspan=''2'' valign=''top'' align=''right'' bgcolor=''" & linecolor & "''></td></tr></table>"
end if
%>
<!--#include file = "footer.inc"-->