<% 'Include do Banco de Dados 'Recupera dados do formulario strNome = Trim(request.Form("NOME")) strSobrenome= Trim(request.Form("SOBRENOME")) strProfissao= Trim(request.Form("PROFISSAO")) strCidade= Trim(request.Form("CIDADE")) strPais= Trim(request.Form("PAIS")) strEmail= Trim(request.Form("EMAIL")) strIndicacao= Trim(request.Form("INDICACAO")) strComentarios= Trim(request.Form("COMENTARIOS")) 'Caso o formulario venha preenchido devemos guarda-lo no banco de dados if Trim(strNome) <> "" then ' Remember to change the path to Northwind.mdb ' to match the location on your system. caminho=left(Server.mappath(Request.ServerVariables("PATH_INFO")), InstrRev(Server.mappath(Request.ServerVariables("PATH_INFO")),"\")) src = caminho & "..\..\dados\database.mdb" sConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & src 'Create and open the Connection object. Set OBJdbConn = Server.CreateObject("ADODB.Connection") OBJdbConn.Open sConnStr 'Verifica se usuário já existe pelo seu email strQuery = "SELECT COUNT(NOME) AS EXISTE FROM TBALUNO WHERE EMAIL='" & strEmail & "'" Set RsInscricao = OBJdbConn.Execute(strQuery) if CInt(RsInscricao("EXISTE")) > 0 then msgErro = "Usuario Já Existe" else strQuery = "INSERT INTO TBALUNO (NOME, SOBRENOME, PROFISSAO, CIDADE, PAIS, EMAIL, INDICACAO, COMENTARIOS) " strQuery = strQuery & "VALUES('" & strNome & "', '" & strSobrenome & "', '" & strProfissao & "', " strQuery = strQuery & "'" & strCidade & "', '" & strPais & "', '" & strEmail & "', " strQuery = strQuery & "'" & strIndicacao & "', '" & strComentarios & "')" Set RsIncrever = OBJdbConn.Execute(strQuery) response.Redirect("pagamento.html") end if end if %> Prototipo da Inscricao do Curso
Enrollement / Inscrição
<%=msgErro%>
First Name/Nome     *
Family Name/Sobrenome     *
Profession/Profissão     *
City/Cidade     *
Country/País     *
E-mail  
  *
    (Fill with a true e-mail/Entre com um e-mail válido)

How do you find our site ?
Como achou nosso site ?
   
Comments/Comentários    
      * Obligatory filling/Campos obrigatórios