set rscount = conn.execute("select count(id) as antal from bruger where kollegie = '" & kollegie & "'") brugere = rscount("antal") rscount.close set rscount = nothing
strSQL = "select * from Points where (kollegie = '" & kollegie & "')" set rs = conn.execute(strSQL)
point = rs("id")
conn.close set conn = nothing End Function %> <center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <img border="0" src="images/Gryffindor.jpg" width="100" height="120"></td> <td> <img border="0" src="images/ravenclaw.jpg" width="100" height="120"></td> <td> <img border="0" src="images/Hufflepuff.jpg" width="100" height="120"></td> <td> <img border="0" src="images/slytherin.jpg" width="100" height="120"></td> </tr> <tr> <td align="center" valign="top"><font size="1"><% If brugere(Gryffindor) = 1 Then %>1 Elev<% Else %><%=brugere(Gryffindor)%> Elever<% End If %><br><% If point(Gryffindor) = 1 Then %>1 Point<% Else %><%=point(Gryffindor)%> Points<% End If %></td> <td align="center" valign="top"><font size="1"><% If brugere(Ravenclaw) = 1 Then %>1 Elev<% Else %><%=brugere(Ravenclaw)%> Elever<% End If %><br><% If point(Ravenclaw) = 1 Then %>1 Point<% Else %><%=point(Ravenclaw)%> Points<% End If %></td> <td align="center" valign="top"><font size="1"><% If brugere(Hufflepuff) = 1 Then %>1 Elev<% Else %><%=brugere(Hufflepuff)%> Elever<% End If %><br><% If point(Hufflepuff) = 1 Then %>1 Point<% Else %><%=point(Hufflepuff)%> Points<% End If %></td> <td align="center" valign="top"><font size="1"><% If brugere(Slytherin) = 1 Then %>1 Elev<% Else %><%=brugere(Slytherin)%> Elever<% End If %><br><% If point(Slytherin) = 1 Then %>1 Point<% Else %><%=point(Slytherin)%> Points<% End If %></td> </tr> </table> </center> <!--#include file="execute/bottom.asp"-->
JEg tror din fejl kommer fordi du ikek har " omrking alle dine strenge i funktion kalden til brugere og point: Gryffindor, Ravenclaw osv.
Eks ret: If brugere(Gryffindor) = 1 Then
Til: If brugere("Gryffindor") = 1 Then
Samt eks ret: <%=point(Slytherin)%>
Til: <%=point("Slytherin")%>
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.