Her er koden til wml filen:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"
http://www.wapforum.org/DTD/wml_1.1.xml"><wml>
<card id="card1" title="QED mobilsektion">
<p>
Brugernavn:<input name="username" size="15" type="text"/><br/>
Password: <input name="password" size="15" type="password"/><br/>
</p>
<do type="accept" label="login" >
<go href="login-validate.asp" method="post">
<postfield name="username" value="$(username)"/>
<postfield name="password" value="@(password)"/>
</go>
</do>
</card>
</wml>
Koden til asp siden:
<%@ Language=VBScript%>
<%'on error resume next
%>
<!--#include file="forbindelse.asp" -->
<%
username = Trim(Replace(request.form("username"),"'","''"))
password = Trim(Replace(request.form("password"),"'","''"))
Set login = Server.CreateObject("ADODB.Recordset")
login.Open "SELECT * FROM login where username = '"& username&"' AND password ='"&password&"'", database
if NOT login.EOF then
response.redirect "index.wml"
else
response.redirect("mobil.wml")
end if
%>