Jag tror att du lättare får hjälp om du beskriver det specifika problemet.
Hur det blir/inte blir. Vad som blir fel/inte blir fel.
Samt, att du klamrar in din kod mellan [kod ] och
Hej på er allihopa.
Sitter här med mitt lilla script , och får inte ut värdena jag vill ha riktigt.
Det jag skulle vilja är att en person som har en viss typ av landplätt enbart ska kunna se de andra som har likadana landplättar. Dvs mitt lag som har landplätt (åker) ska inte kunna se andra spelare som har landplätt (stad).
Tackar för hjälpen
<%
uid=trim(session("uid"))
Set RS = Conn.execute("SELECT count(*) as numberp FROM player where uid = '"&uid&"'")
while not RS.eof
numberOfPlayer=cint(rs("numberp"))
RS.movenext
wend
RS.close
Set RS = nothing
Set RS = Conn.execute("SELECT count(*) as landplattavailable FROM userinfo where uid = '"&uid&"' and landplatt is null")
while not RS.eof
landplatt=cint(rs("landplattavailable"))
RS.movenext
wend
RS.close
Set RS = nothing
if numberOfPlayer < 5 then
%>
<script language="javascript">
alert("Du måste ha 6 spelare för att kunna utmanna, du har just nu <%=numberOfPlayer%> spelare")
window.close()
</script>
<%else if stadium<>0 then%>
<script language="javascript">
alert("Du måste köpa en landplätt innan du kan utmanna")
window.close()
</script>
<%else%><b>
Välj laget du vill utmana:
<p> <font color="225533">Lag namn</font>
<form name="cha" action="challenge.asp" method=Post>
<select name="team" size=10>
<%
'spelaren ska enbart se likadana landplättar
'Set RS66 = Conn.execute("SELECT * From userinfo WHERE stadium <> '"&stadium&"'")
Set RS = Conn.execute("SELECT * FROM userinfo where uid <> '"&uid&"'")
while not RS.eof
uid2=trim(rs("uid"))
Set rs1= Conn.execute("SELECT count(*) as totalplayers FROM player where uid ='"&uid2&"'")
while not RS1.eof
totalplayers=cint(rs1("totalplayers"))
RS1.movenext
wend
RS1.close
Set RS1 = nothing
if totalplayers >= 6 then
%>
<option value="<%=trim(rs("tname"))%>"><%=rs("tname")%>(<%=rs("fan")%>)</option>
<%
end if
RS.movenext
wend
RS.close
Set RS = nothing
