<% Sub DoCount ' ### Updates the totals Table strSQl ="Update totals set totals.U_Count=totals.U_Count + 1" my_conn.Execute (strSQL) End Sub Sub ShowForm() %>

Registo de <% =BBTitle %>

<% End Sub %> <% If Request.QueryString("mode") <> "doit" then Call ShowForm Else Function ChkString(string) if string = "" then string = " " ChkString = Replace(string, "'", "''") End Function Err_Msg = "" if Request.Form("name") = "" then Err_Msg = Err_Msg & "
  • Tem que escolher um Username (Nome de Utilizador)
  • " if Request.Form("password") = "" then Err_Msg = Err_Msg & "
  • Tem que escolher uma a password
  • " if Request.Form("password") <> Request.Form("password2") then Err_Msg = Err_Msg & "
  • As passwords não coincidem.
  • " if Request.Form("email") = "" then Err_Msg = Err_Msg & "
  • Tem de introduzir o seu email
  • " set my_conn= Server.CreateObject("ADODB.Connection") my_Conn.Open ConnString strSql = "Select M_Name from members where M_Name = '" & Request.Form("name") &"'" set rs = my_conn.Execute (StrSql) if rs.bof and rs.eof then ' OK Else Err_Msg = Err_Msg & "
  • O Username já existe, por favor escolha outro
  • " End If rs.close set rs = nothing if Err_Msg = "" then strSql = "insert into members (M_Name, M_Password, M_Email, M_Country, M_Sig, M_ICQ, M_Posts, M_Homepage) Values ('" strSql = StrSQl & ChkString(Request.Form("name")) & "', '" strSql = StrSQl & ChkString(Request.Form("password")) & "', '" strSql = StrSQl & ChkString(Request.Form("email")) & "', '" strSql = StrSQl & ChkString(Request.Form("country")) & "', '" strSql = strSQL & ChkString(Request.Form("sig")) & "', '" strSql = strSQL & ChkString(Request.Form("ICQ")) & "', " strSql = strSQL & "0, '" strSql = StrSQl & ChkString(Request.Form("homepage")) & "')" my_conn.Execute (StrSql) docount Else %>

    Houve um problema com as suas informações -

      <%= Err_Msg %>
    <% call ShowForm On Error Resume next my_conn.Close set my_conn = nothing Response.End End If %>

    O seu registo está completo!

    Voltar ao Fórum <% End If On Error Resume next my_conn.Close set my_conn = nothing %>