Multiple "If...then....else if...." problem ?

Posted by bahamut100 on Stack Overflow See other posts from Stack Overflow or by bahamut100
Published on 2010-03-07T23:10:34Z Indexed on 2010/03/07 23:11 UTC
Read the original article Hit count: 159

Filed under:
|

Hi, I'm new in ASP development.

This is my source code :

ident = request.Form("ident")
pass=request.Form("passe")
response.write(ident)
response.write(pass)

if pass= "m" and ident="m" Then 
    Session("connect")="membre"
    response.redirect("../")
else if pass= "g" and ident="g" Then 
        Session("connect")="gest"
        response.redirect("../")
else if pass= "a" and ident="a" Then
        Session("connect")="admin"
        response.redirect("../")
else    
    response.redirect("ident.asp")
End If

But, with this code, I get this :

"Erreur de compilation Microsoft VBScript error '800a0401'

Fin d'instruction attendue

/iisHelp/common/500-100.asp, line 11

Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP Dim strMethod, lngPos, datNow, strQueryString, strURL --------------------------------------------------------------------------^

Erreur de compilation Microsoft VBScript error '800a03f6'

'End' attendu

/groupe2/stage23/TP3/verif_id.asp, line 18 "

© Stack Overflow or respective owner

Related posts about asp

Related posts about algorithm