Phip
08-10-2002, 10:42 PM
well i have no idea what i am doing much. i'm trying to learn asp, i already know php. how do i do this right?
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
IF goSignup = "1" Then
Set ConnSQL = Server.CreateObject("ADOBD.Connection")
path = Server.MapPath("\") + "\db\user.mdb"
ConnSQL.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ = " & path
sql = "INSERT INTO user_key (id, username, password, email) VALUES ('', request.QueryString(username), request.QueryString(password), 'phipx@chronicyouth.com')"
Set RS = server.CreateObject("adodb.recordset")
Set RS = ConnSQL.Execute(sql)
END IF
%>
<body>
<form action="index.asp" method="get" name="signup" target="_top">
username :
<input name="username" type="text" id="username">
<br>
password:
<input name="password" type="password" id="password">
<input name="goSignup" type="hidden" id="goSignup" value="1">
<br>
<input type="submit" name="Submit" value="Submit">
</form>
<br><br>
<%
getSql = "SELECT * FROM user_key WHERE id = '1'"
response.Write(getSQL)
Conn.Execute(getSQL)
%>
</body>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
IF goSignup = "1" Then
Set ConnSQL = Server.CreateObject("ADOBD.Connection")
path = Server.MapPath("\") + "\db\user.mdb"
ConnSQL.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ = " & path
sql = "INSERT INTO user_key (id, username, password, email) VALUES ('', request.QueryString(username), request.QueryString(password), 'phipx@chronicyouth.com')"
Set RS = server.CreateObject("adodb.recordset")
Set RS = ConnSQL.Execute(sql)
END IF
%>
<body>
<form action="index.asp" method="get" name="signup" target="_top">
username :
<input name="username" type="text" id="username">
<br>
password:
<input name="password" type="password" id="password">
<input name="goSignup" type="hidden" id="goSignup" value="1">
<br>
<input type="submit" name="Submit" value="Submit">
</form>
<br><br>
<%
getSql = "SELECT * FROM user_key WHERE id = '1'"
response.Write(getSQL)
Conn.Execute(getSQL)
%>
</body>