macromedia.dreamweaver.appdev
[Top] [All Lists]

Re: check new user SB and pureupload ASP user

Subject: Re: check new user SB and pureupload ASP user
From: "twocans"
Date: Wed, 14 May 2008 11:29:16 +0100
Newsgroups: macromedia.dreamweaver.appdev

this is the code for the check new user

this UploadFormRequest("ininbutt") is rfom the form button, when the form is 
submitted then this should be finred, but its not the case.


<%
' *** Redirect if username exists
MM_flag = UploadFormRequest("ininbutt")
If (CStr(Request(MM_flag)) <> "") Then
  Dim MM_rsKey
  Dim MM_rsKey_cmd

  MM_dupKeyRedirect = "ffff.asp"
  MM_dupKeyUsernameValue = CStr(Request.Form("ggg"))
  Set MM_rsKey_cmd = Server.CreateObject ("ADODB.Command")
  MM_rsKey_cmd.ActiveConnection = MM_connpeepeek_STRING
  MM_rsKey_cmd.CommandText = "SELECT imagesku FROM piddle.ps_usr_image WHERE 
imagessku = ?"
  MM_rsKey_cmd.Prepared = true
  MM_rsKey_cmd.Parameters.Append MM_rsKey_cmd.CreateParameter("param1", 200, 
1, 45, MM_dupKeyUsernameValue) ' adVarChar
  Set MM_rsKey = MM_rsKey_cmd.Execute
  If Not MM_rsKey.EOF Or Not MM_rsKey.BOF Then
    ' the username was found - can not add the requested username
    MM_qsChar = "?"
    If (InStr(1, MM_dupKeyRedirect, "?") >= 1) Then MM_qsChar = "&"
    MM_dupKeyRedirect = MM_dupKeyRedirect & MM_qsChar & "requsername=" & 
MM_dupKeyUsernameValue
    Response.Redirect(MM_dupKeyRedirect)
  End If
  MM_rsKey.Close
End If
%> 



<Prev in Thread] Current Thread [Next in Thread>