using asp to write login page
i have tried to write a login function using asp and mysql and get some errors...hope someone can help.
login.asp
<form id="form1" name="form1" method="post" action="check.asp">
<p>Login</p>
<table width="312" border="1">
<tr>
<td width="47">Login</td>
<td width="249">
<label>
<input type="text" name="username"/>
</label>
</td>
</tr>
<tr>
<td>Password</td>
<td>
<label>
<input name="pwd" type="password" maxlength="10" />
</label>
</td>
</tr>
<tr>
<td> </td>
<td><label>
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</label></td>
</tr>
</table>
<p> </p>
</form>
check.asp
<body>
<%
Dim Conn, cStr, sql, RS, username, pwd
username = Request.Form("username")
pwd = Request.Form("pwd")
Set Conn = Server.CreateObject("ADODB.Connection")
sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=home; UID=user;PASSWORD=111111; OPTION=3"
Conn.Open(cStr)
sql = "select username from tbl_users where loginName = '" & username & " and password = '" & pwd & "'"
Set RS = Conn.Execute(sql)
If RS.BOF And RS.EOF Then
'Error_Msg = "Login Failed. Try Again."
response.redirect "login.asp"
Else
Session("LoggedIn") = "true"
Response.Redirect "menu.asp"
End If
%>
</body>
The error is sth like
must get ';'
check.asp, line 12, column 4
Dim Conn, cStr, sql, RS, username, pwd;
--^
Thank you

