insert into sætning
Hej!Jeg har denne sætning kan i se hvad der er galt??
<%
if request("tekst") = "" Then
response.redirect "skrivannonce.asp?error=PROFIL TEKST"
elseif request("tlf") = "" Then
response.redirect "skrivannonce.asp?error=TELEFON"
elseif request("mail") = "" Then
response.redirect "skrivannonce.asp?error=MAIL"
elseif request("tekst") = "" Then
response.redirect "skrivannonce.asp?error=PROFIL TEKST"
elseif request("brugernavn") = "" Then
response.redirect "skrivannonce.asp?error=BRUGERNAVN"
elseif request("password1") = "" or request("password2") = "" Then
response.redirect "skrivannonce.asp?error=PASSWORD"
elseif NOT request("password1") = request("password2") Then
response.redirect "skrivannonce.asp?error=PASSWORD"
end if
tekst = Replace(request.Form("tekst"),vbCrLf,"<br>")
if NOT request.form("ejer") = "" Then
ejer = request.form("ejer")
else
ejer = "ingen"
end if
salon = request.form("salon")
if request.form("adr") = "" Then
adr = "ingen"
else
adr = request.form("adr")
end if
if request.form("by") = "" Then
by = "ingen"
else
by = request.form("by")
end if
tlf = request("opd")
if request("website") = "" Then
web = "ingen"
else
web = request.form("web")
end if
mail = request("mail")
if request("egen") = "" Then
egen = "ingen"
else
egen = request("egen")
end if
brugernavn = request("brugernavn")
password = request("password1")
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath ("medlemmer.mdb")
Conn.Open DSN
SQL = "Insert into medlemsprofil (salon, ejer, adr, by, tlf, web, mail, egen, brugernavn, password, tekst) VALUES ('" + salon + "', '" + ejer + "', '" + adr + "', '" + by + "', " + tlf + ", '" + web + "', '" + mail + "', '" + egen + "', '" + brugernavn + "', '" + password + "', '" + tekst + "')"
Conn.Execute(SQL)
conn.close
set conn = Nothing
%>
<body bgcolor="#CED7DB">
<table border="0" width="59%" height="256" align="center">
<tr>
<td width="100%" height="21">
<p align="center"><font face="Tahoma">DIN PROFIL ER NU OPRETTET!</font></td>
</tr>
<tr>
<td width="100%" height="227">
<div align="center">
<table border="0" width="65%" height="196">
<tr>
<td width="29%" height="21"><font face="Tahoma">SALON:</td>
<td width="71%" height="21"><font face="Tahoma"><%=request("salon")%></font></td>
</tr>
<tr>
<td width="29%" height="21"><font face="Tahoma">INDEHAVER:</font></td>
<td width="71%" height="21"><font face="Tahoma"><%=request("ejer")%></font></td>
</tr>
<tr>
<td width="29%" height="21"><font face="Tahoma">ADRESSE:</font></td>
<td width="71%" height="21"><font face="Tahoma"><%if request("adr") = "" Then
response.write "ingen"
else
response.write request("adr")
end if%></font></td>
</tr>
<tr>
<td width="29%" height="21"><font face="Tahoma">POSTNR-BY:</font></td>
<td width="71%" height="21"><font face="Tahoma"><%if request("by") = "" Then
response.write "ingen"
else
response.write request("by")
end if%></font></td>
</tr>
<tr>
<td width="29%" height="21"><font face="Tahoma">TELEFON - FAX:</font></td>
<td width="71%" height="21"><font face="Tahoma"><%=request("tlf")%></font></td>
</tr>
<tr>
<td width="29%" height="21"><font face="Tahoma">BRUGERNAVN:</font></td>
<td width="71%" height="21"><font face="Tahoma"><%=request("brugernavn")%></font></td>
</tr>
<tr>
<td width="29%" height="16"><font face="Tahoma">PROFIL TEKST:</font></td>
<td width="71%" height="17" rowspan="2"><font face="Tahoma"><%=request("tekst")%></font></td>
</tr>
<tr>
<td width="29%" height="1"></td>
</tr>
<tr>
<td width="29%" height="21"><a href="default.asp"><font face="Tahoma">Forsiden</font></a></td>
<td width="71%" height="21"><a href="brugeradmin.asp"><font face="Tahoma">Gå
direkte til admin</font></a></td>
</tr>
</table>
</div>
</td>
</tr>
</table>