Results 1 to 1 of 1

Thread: Inserting record into database

  1. #1
    Join Date
    Jan 2003
    Posts
    30

    Inserting record into database

    I am currently trying to implement a registration service. Users are allowed to enter their desired username and password through their mobile and the values will be inserted into the database. However, the emulator keeps telling me there is a syntax error with the INSERT INTO statement. Can anyone help me take a look?

    <!--#include file="conn.asp" -->
    <% 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">
    <wml>
    <card id="register" title="Registration">
    <p>
    To register, please enter your desired username and password.


    <br/>
    <img localsrc="head1">
    <b>Name:</b>
    <input name="newname"/><br/><br/>
    <b>Password:</b>
    <input name="newpw"/><br/><br/>
    <img localsrc="righthand">
    <anchor>Submit
    <go href="#register2">
    <postfield name="newname" value="$(newname)"/>
    <postfield name="newpw" value="$(newpw)"/>
    </go>
    </anchor>
    </p>
    <p>
    <do type="options" label="Back">
    <prev/>
    </do>
    </p>
    </card>

    <card id="register2" title="Registration">
    <p>
    <%
    dim newuser, newpwd, SQLquery
    newuser=Request.QueryString("newname")
    newpwd=Request.QueryString("newpw")
    Session("name")=newuser
    Session("pw")=newpwd

    SQLquery = "INSERT INTO users(user_name,password) VALUES ('"&Session("name")&"','"&Session("pw")&"')"


    conn.Execute(SQLquery)

    %>
    <do type="accept" label="Proceed">
    <go href="login.asp">
    </do>
    </p>
    </card>

    </wml>
    Last edited by OtarBoy; 03-08-2004 at 06:49 AM.

Posting Permissions

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