seid er bare lavet til den kode som skal genereres.
forstår jeg dig ret at det skal se sådan her ud
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include virtual="/pokerfreak/Connections/pokerfreak.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
function MakeCode(count)
Dim randchars
randchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678901234567890123456789"
Dim s = ""
Randomize
For I = 0 To Count-1
s = s + Mid(randchars, Int(Rnd * (Len(randchars)-1)), 1)
Next
MakeCode = s
end function
Dim aktiveringskode
aktiveringskode = MakeCode(30)
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_pokerfreak_STRING
MM_editCmd.CommandText = "INSERT INTO brugerdata ([user], email, seid) VALUES (?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("textfield")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("textfield2")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, Request.Form("seid")) ' adVarWChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "/pokerfreak/brugerkig.asp"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Dim nybruger
Dim nybruger_cmd
Dim nybruger_numRows
Set nybruger_cmd = Server.CreateObject ("ADODB.Command")
nybruger_cmd.ActiveConnection = MM_pokerfreak_STRING
nybruger_cmd.CommandText = "SELECT * FROM brugerdata"
nybruger_cmd.Prepared = true
Set nybruger = nybruger_cmd.Execute
nybruger_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="POST" action="<%=MM_editAction%>">
<label>navn
<input type="text" name="textfield" />
</label>
<p>
<label>email
<input type="text" name="textfield2" />
</label>
</p>
<p>
<label>opret
<input type="submit" name="Submit" value="Submit" />
</label>
</p>
<p>
<input type="hidden" name="MM_insert" value="form1">
</p>
</form>
</body>
</html>
<%
nybruger.Close()
Set nybruger = Nothing
%>
jeg er jo ikke en haj til det her kode, plejer mest bare at bruge de funktioner der nu er i Dreamweaver