Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2006

    help no error ut not working wml with ASP

    Hello I need urgent help on this plzzzzzzzzzzzzzzzz
    im working with my thesis a wap site with asp

    have prob with the login heres my code

    <%Response.ContentType = "text/vnd.wap.wml"%>
    <?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <head><meta http-equiv="Cache-Control" content="No-Cache" forua="true" /></head>
    Dim conn, rs
    Dim strSQL,intSnum, strSname
    Set conn = Server.CreateObject("ADODB.Connection")
    Set rs = Server.CreateObject("ADODB.Recordset")

    conn.open "Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Port=3306; Option=0; Socket=; Stmt=; Database=sss; Uid=root; Pwd=;"

    rs.ActiveConnection = conn
    intSnum = Request.QueryString("ssnum")
    strSname = Request.QueryString("sname")
    if intSnum="" and strSname="" then
    <card id="LogIn" title="LogIn">
    SSS Number :<br/><input name="ssnum" format="NNNNNNNNNN" maxlength="15" emptyok="false"/><br/>
    Surname :<br/><input name="sname" type = "text" maxlength="15" emptyok="false"/><br/>
    Date of Birth :<br/><input name="bday" format="NNNN\-NN\-NN" maxlength="15" emptyok="false"/>

    <do type="accept" label="search">
    <go href="log.asp" method="get">
    <postfield name="ssnum" value="$ssnum"/>
    <postfield name="sname" value="$sname"/>

    strSQL = "SELECT SSNUM,SURNM,DOBTH,GIVNM FROM md WHERE SSNUM ="& intSnum & " and SURNM = 'strSname'"
    Set rs = conn.Execute(strSQL)

    %> <card id="UserResult" title="Result">
    <do type="accept" label="back">
    <go href="111.asp"/>
    <%if not rs.EOF then%>

    Response.Write "<strong>Welcome to SSS Mobile </strong>" & rs("GIVNM")

    intSnum = "<br/><b>SSS Number</b><br/> " & rs("SSNUM")
    strSname = "<br/><b>Surname</b><br/>" & rs("SURNM")
    Response.Write intSnum
    Response.Write strSname
    Response.Write "<br/><b>Date of Birth:</b><br/>" & rs("DOBTH")
    <onevent type="ontimer">
    <go href="menuet.asp"/>
    <timer value="25"/>
    <% else
    Response.Write "Sorry, no user found."
    <onevent type="ontimer">
    <go href="log.asp"/>
    <timer value="25"/>
    <%end if%>
    end if

    didnt include the< postfield name="bday" value="$bday"/>
    coz it wont totally work if i did

    the sql query is not working i always get no user found but i cannot find any error on my code can any1 help me plz mail me the code cfane009@yahoo.com thanks in advance
    its so hard to code coz its limited cant use some functions of ASP

  2. #2
    Registered User
    Join Date
    Jun 2004

    Re: help no error ut not working wml with ASP

    <head><meta http-equiv="Cache-Control" content="No-Cache" forua="true" /></head>
    is wrong, it isn't needed...

    Try printing out the query then run directly against the database to see if that it returns what you expect.

    Does it work in a web browser?


    # Any form of employment is strictly prohibited ......

Similar Threads

  1. wml and asp
    By saghirqasim in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2003-11-17, 09:37
  2. ASP and WML
    By vsvirdee in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2002-08-20, 06:35
  3. How to configure my IIS for ASP with WML
    By atifkhan in forum WAP Servers
    Replies: 0
    Last Post: 2002-05-18, 07:27
  4. WML with ASP
    By Nokia_Archived in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2002-05-15, 20:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts