26. januar 2007 - 10:45Der er
7 kommentarer og 1 løsning
If kode hjælp.
Hej.
Jeg har denne her kode jeg ikke kan få til at virke:
if request.Form("ProfiltekstM") = "Ja" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstM='Ja' WHERE id='" & Session("BrugerID") & "'" end if If request.Form("ProfiltekstS") = "Ja" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstS='Ja' WHERE id='" & Session("BrugerID") & "'" end if If request.Form("ProfiltekstS") = "Ja" AND request.Form("ProfiltekstM") = "Ja" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstS='Ja', ProfiltekstM='Ja' WHERE id='" & Session("BrugerID") & "'" end if if request.Form("ProfiltekstM") = "" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstM='Nej' WHERE id='" & Session("BrugerID") & "'" end if If request.Form("ProfiltekstS") = "" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstS='Nej' WHERE id='" & Session("BrugerID") & "'" end if If request.Form("ProfiltekstS") = "" AND request.Form("ProfiltekstM") = "" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstS='Nej', ProfiltekstM='Nej' WHERE id='" & Session("BrugerID") & "'" End If
if request.Form("ProfiltekstM") = "Ja" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstM='Ja' WHERE id='" & Session("BrugerID") & "'" Conn.Execute(strSQL)
end if If request.Form("ProfiltekstS") = "Ja" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstS='Ja' WHERE id='" & Session("BrugerID") & "'" Conn.Execute(strSQL)
end if If request.Form("ProfiltekstS") = "Ja" AND request.Form("ProfiltekstM") = "Ja" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstS='Ja', ProfiltekstM='Ja' WHERE id='" & Session("BrugerID") & "'" Conn.Execute(strSQL)
end if if request.Form("ProfiltekstM") = "" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstM='Nej' WHERE id='" & Session("BrugerID") & "'" Conn.Execute(strSQL)
end if If request.Form("ProfiltekstS") = "" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstS='Nej' WHERE id='" & Session("BrugerID") & "'" Conn.Execute(strSQL)
end if If request.Form("ProfiltekstS") = "" AND request.Form("ProfiltekstM") = "" then strSQL = "Update Bruger set Profiltekst='" & replace(Request.Form("Textarea"), "'", "''") & "', ProfiltekstS='Nej', ProfiltekstM='Nej' WHERE id='" & Session("BrugerID") & "'" Conn.Execute(strSQL) End If
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.