Hi, I am doing a project on accessing MS Access database using ASP and WML. I'm very new to ASP and WML. I'm using Nokia Mobile Browser 4.0 to view all my ASP files after installing IIS. But it keeps on giving me the same kind of error on the screen: Cannot load
http://localhost/login.asp (HTTP Error 500 Server Error)
What does it mean? Is there anything wrong with my codes?
And am I coding ASP correctly? 'cos I require the user to click buttons and not links to move to the next "card"/file.
Do I use a form to declare my buttons? Or is there any other way to include submit buttons?
Do I have to include <% %> for my buttons?
Do I have to create System DSN to add my database for my ASP to connect to my db?
Do I have to create my login.asp as XHTML instead of ASP for my buttons?
Below is my code for login.asp
<%Response.ContentType="text/vnd.wap.wml"%>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="login" title="Login Page">
<p align = "center">
<form action="#validate" method="get">
Please enter User ID and Password.<br/>
User ID : <input type="text" name="userid" maxlength="10"/>
Password :
<input type="password" name="pw" maxlength="10"/>
<br/>
<input type="submit" name="Submit" value="Login"/>
<input name="Reset" type="reset" value="Reset"/>
</form>
</p>
</card>
<card id="validate">
<%
Dim conn
Dim rs
Dim sql, userID, passwd
userID=Request.QueryString("userid")
passwd=Request.QueryString("pw")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db.mdb")
sql = "select * from UserProfile where ID='" & userID & "' and password='" & passwd & "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn
Do While not rs.EOF
%>
<do type="accept">
<go href="welcome.asp"/>
</do>
<%
Loop
}
else{
%>
<p align="center">Invalid Username or Password
<a href="#login">Re-Login again</a>
</p>
<%
}
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
</card>
</wml>
I would appreciate greatly if anyone can advise 'cos I really know nothing about ASP. Already tried searching information in the web but alas, nothing much. Need help urgently..