Ir para conteúdo
Fórum Script Brasil
  • 0

Me Ajudem Com O Script De Cadastro


mestre fyoda

Pergunta

Ele aviza que o usuario já esta cadastrado , detalhe o meu bd está vazio e dá esse erro .

<%

If Request.Form("enviado") = "sim" Then

nome = Replace(Request.Form("nome"), "'", "/")

snome = Replace(Request.Form("snome"), "'", "/")

sexo = Replace(Request.Form("sexo"), "'", "/")

email = Replace(Request.Form("email"), "'", "/")

login = Replace(Request.Form("login"), "'", "/")

senha = Replace(Request.Form("senha"), "'", "/")

c_senha = Replace(Request.Form("c_senha"), "'", "/")

Set CX = Server.CreateObject("ADODB.connection")

CX.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("banco.mdb")

Set CX2 = Server.CreateObject("ADODB.connection")

CX2.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("banir/banco.mdb")

Set rs = CX.Execute("Select * from usuarios where login = '"&login&"' ")

IF rs.EOF Then

Response.Write "Usuário já cadastrado"

Else

Set rs = CX.Execute("Select * from usuarios where email = '"&email&"' ")

IF rs.EOF Then

Response.Write "Email já cadastrado"

Else

if senha <> c_senha Then

Response.Write "Senha e confirma Senha estão incorretos "

Else

sql = "insert into dados (nome, snome,email,login, senha, sexo) values ('"&nome&"', '"&snome&"' ,'"&email&"', '"&login&"', '"&senha&"', '"&sexo&"')"

sq2 = "insert into dados (nome, email,usuario, senha) values ('"&nome&"', '"&email&"', '"&login&"', '"&senha&"')"

CX.execute(sql)

CX2.execute(sq2)

CX.close

set CX = nothing

CX2.close

set CX2 = nothing

response.Redirect("red_cadastro.asp")

END IF

END IF

END IF

Else %>

<head>

<style>

<!--

a{text-decoration:none}

//-->

</style>

</SCRIPT>

<LINK

href="images/padrão.css" rel=stylesheet type=text/css>

<STYLE type=text/css>#divUpControl {

HEIGHT: 13px; LEFT: 518px; POSITION: absolute; TEXT-ALIGN: right; TOP: 340px; WIDTH: 12px; Z-INDEX: 1

}

#divDownControl {

HEIGHT: 12px; LEFT: 519px; POSITION: absolute; TEXT-ALIGN: right; TOP: 573px; WIDTH: 11px; Z-INDEX: 1

}

#divContainer {

CLIP: rect(0px 163px 232px 0px); HEIGHT: 232px; LEFT: 353px; OVERFLOW: hidden; POSITION: absolute; TOP: 346px; VISIBILITY: hidden; WIDTH: 163px

}

#divContent {

LEFT: 0px; POSITION: absolute; TOP: 0px

}

</STYLE>

<STYLE type=text/css>.tabela {

BACKGROUND: #f5f5f5; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; COLOR: #000000; FONT-FAMILY: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; FONT-SIZE: 11px

}

.link {

COLOR: #000000; TEXT-DECORATION: none

}

.link:hover {

COLOR: #ff8040; TEXT-DECORATION: none

}

.TD {

COLOR: #000000; FONT-FAMILY: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; FONT-SIZE: 11px

}

.campo {

BACKGROUND: #ffffff; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; COLOR: #000000; FONT-FAMILY: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; FONT-SIZE: 11px

}

.botao {

BACKGROUND: #f3f3f3; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #bbbbbd 1px solid; BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #bbbbbd 1px solid; COLOR: #000000; FONT-FAMILY: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif; FONT-SIZE: 11px

}

.botao2 {

BACKGROUND-COLOR: #e8e8e8; BORDER-BOTTOM-COLOR: #ffffff; BORDER-BOTTOM-WIDTH: 1px; BORDER-LEFT-COLOR: #ffffff; BORDER-LEFT-WIDTH: 1px; BORDER-RIGHT-COLOR: #ffffff; BORDER-RIGHT-WIDTH: 1px; BORDER-TOP-COLOR: #ffffff; BORDER-TOP-WIDTH: 1px; COLOR: black; FONT-FAMILY: Tahoma, Verdana; FONT-SIZE: 8pt

}

.Menu:link {

BACKGROUND-COLOR: #ffffff; COLOR: #000000; FONT-FAMILY: Tahoma, Verdana; FONT-SIZE: 11px; HEIGHT: 20px; PADDING-TOP: 2px; TEXT-DECORATION: none; WIDTH: 160px

}

.Menu:visited {

BACKGROUND-COLOR: #ffffff; COLOR: #000000; FONT-FAMILY: Tahoma, Verdana; FONT-SIZE: 11px; HEIGHT: 20px; PADDING-TOP: 2px; TEXT-DECORATION: none; WIDTH: 160px

}

.Menu:unknown {

BACKGROUND-COLOR: #ffffff; COLOR: #000000; FONT-FAMILY: Tahoma, Verdana; FONT-SIZE: 11px; HEIGHT: 20px; PADDING-TOP: 2px; TEXT-DECORATION: none; WIDTH: 160px

}

.Menu:hover {

BACKGROUND-COLOR: #f5f5f5; COLOR: #000000; FONT-FAMILY: Tahoma, Verdana; FONT-SIZE: 11px; HEIGHT: 20px; PADDING-TOP: 2px; TEXT-DECORATION: none; WIDTH: 160px

}

</STYLE>

<script type="text/javascript"> </script>

<!--TEMPLATE: skin_global, Template Part: css_inline-->

<style type='text/css'>

html { overflow-x: auto }

form { display: inline }

img { vertical-align: middle; border: 0px }

BODY { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; margin: 10px 10px 10px 10px; color: #003366; background-color: #FFF }

TABLE, TR, TD { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; color: #003366 }

a:link, a:visited, a:active { text-decoration: none; color: #003366 }

a:hover { text-decoration: underline; color: #465584 }

fieldset.search { padding: 6px; line-height: 150% }

label { cursor: pointer }

img.attach { padding: 2px; border: 0px outset #EEF2F7 }

#blaz-header { background-color: #4b4b4b; height: 85px; border: 1px solid #345487; }

#blaz-logo { float: left; }

#blaz-banner { padding-top: 13px; text-align: center; }

h1 { font-size: 15px; color: #003366; line-height: 150% }

.googleroot { padding: 6px; line-height: 130% }

.googlechild { padding: 6px; margin-left: 30px; line-height: 130% }

.googlebottom, .googlebottom a:link, .googlebottom a:visited, .googlebottom a:active { font-size: 11px; color: #3A4F6C }

.googlish, .googlish a:link, .googlish a:visited, .googlish a:active { font-size: 14px; font-weight: bold; color: #00D }

.googlepagelinks { font-size: 1.1em; letter-spacing: 1px }

.googlesmall, .googlesmall a:link, .googlesmall a:active, .googlesmall a:visited { font-size: 10px; color: #434951 }

li.helprow { padding: 0px; margin: 0px 0px 10px 0px }

ul#help { padding: 0px 0px 0px 15px }

option.cat { font-weight: bold }

option.sub { font-weight: bold; color: #555 }

.caldate { text-align: right; font-weight: bold; font-size: 11px; padding: 4px; margin: 0px; color: #777; background-color: #DFE6EF }

.warngood { color: green }

.warnbad { color: red }

#padandcenter { margin-left: auto; margin-right: auto; text-align: center; padding: 14px 0px 14px 0px }

#profilename { font-size: 28px; font-weight: bold }

#calendarname { font-size: 22px; font-weight: bold }

#photowrap { padding: 6px }

#phototitle { font-size: 24px; border-bottom: 1px solid black }

#photoimg { text-align: center; margin-top: 15px }

#ucpmenu { line-height: 150%; width: 22%; background-color: #F5F9FD; border: 1px solid #345487 }

#ucpmenu p { padding: 2px 5px 6px 9px; margin: 0px }

#ucpcontent { line-height: 150%; width: auto; background-color: #F5F9FD; border: 1px solid #345487 }

#ucpcontent p { padding: 10px; margin: 0px }

#ipsbanner { position: absolute; top: 1px; right: 5% }

#logostrip { padding: 0px; margin: 0px; background-color: #4B4B4B; border: 1px solid #345487 }

#submenu { font-size: 10px; margin: 3px 0px 3px 0px; font-weight: bold; color: #3A4F6C; background-color: #DFE6EF; border: 1px solid #BCD0ED }

#submenu a:link, #submenu a:visited, #submenu a:active { font-weight: bold; font-size: 10px; text-decoration: none; color: #3A4F6C }

#userlinks { background-color: #F0F5FA; border: 1px solid #C2CFDF }

#navstrip { font-weight: bold; padding: 6px 0px 6px 0px; color: #003366; font-size: 12px }

.activeuserstrip { padding: 6px; background-color: #BCD0ED }

.pformstrip { font-weight: bold; padding: 7px; margin-top: 1px; color: #3A4F6C; background-color: #D1DCEB }

.pformleft { padding: 6px; margin-top: 1px; width: 25%; border-top: 1px solid #C2CFDF; border-right: 1px solid #C2CFDF; background-color: #F5F9FD }

.pformleftw { padding: 6px; margin-top: 1px; width: 40%; border-top: 1px solid #C2CFDF; border-right: 1px solid #C2CFDF; background-color: #F5F9FD }

.pformright { padding: 6px; margin-top: 1px; border-top: 1px solid #C2CFDF; background-color: #F5F9FD }

.post1 { background-color: #F5F9FD }

.post2 { background-color: #EEF2F7 }

.postlinksbar { padding: 7px; margin-top: 1px; font-size: 10px; background-color: #D1DCEB; background-image: url(style_images/1/tile_sub.gif) }

.row1 { background-color: #F5F9FD }

.row2 { background-color: #F0F0F0 }

.row3 { background-color: #EEF2F7 }

.row4 { background-color: #E4EAF2 }

.row5 { background-color: #E4EAF2; font-size: 12px }

.darkrow1 { color: #4C77B6; background-color: #C2CFDF }

.darkrow2 { color: #3A4F6C; background-color: #BCD0ED }

.darkrow3 { color: #3A4F6C; background-color: #D1DCEB }

.hlight { background-color: #DFE6EF }

.dlight { background-color: #EEF2F7 }

.titlemedium { font-weight: bold; padding: 7px; margin: 0px; color: #3A4F6C; background-image: url(style_images/1/tile_sub.gif) }

.titlemedium a:link, .titlemedium a:visited, .titlemedium a:active { text-decoration: underline; color: #3A4F6C }

.maintitle { vertical-align: middle; font-weight: bold; letter-spacing: 0px; padding: 8px 0px 8px 5px; color: #FFF; background-image: url(style_images/1/tile_back.gif); font-size: 12px }

.maintitle a:link, .maintitle a:visited, .maintitle a:active { text-decoration: none; color: #FFF }

.maintitle a:hover { text-decoration: underline }

.plainborder { background-color: #F5F9FD; border: 1px solid #839DCE }

.tableborder { background-color: #FFF; border: 1px solid #839DCE }

.tablefill { padding: 6px; background-color: #F5F9FD; border: 1px solid #839DCE }

.tablepad { padding: 6px; background-color: #F5F9FD }

.tablebasic { width: 100%; padding: 0px 0px 0px 0px; margin: 0px; border: 0px }

.wrapmini { float: left; line-height: 1.5em; width: 25% }

.pagelinks { float: left; line-height: 1.2em; width: 35% }

.desc { font-size: 10px; color: #434951 }

.edit { font-size: 9px }

.signature { font-size: 12px; color: #003366; line-height: 150% }

.postdetails { font-size: 10px }

.postcolor { font-size: 12px; line-height: 160% }

.postcolor a:link, .postcolor a:visited, .postcolor a:active { text-decoration: underline; }

.normalname { font-size: 12px; font-weight: bold; color: #003 }

.normalname a:link, .normalname a:visited, .normalname a:active { font-size: 12px }

.unreg { font-size: 11px; font-weight: bold; color: #900 }

.searchlite { font-weight: bold; color: #F00; background-color: #FF0 }

#QUOTE { font-family: Verdana, Arial; font-size: 11px; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; color: #444444; background-color: #FAFAFA; border: 1px solid #D1D7DC; line-height: 110% }

#CODE { font-family: Courier, 'Courier New', Verdana, Arial; font-size: 11px; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; color: #006600; background-color: #FAFAFA; border: 1px solid #D1D7DC; line-height: 110% }

.copyright { font-family: Verdana, Tahoma, Arial, Sans-Serif; font-size: 9px; line-height: 12px }

.codebuttons { font-size: 10px; font-family: verdana, helvetica, sans-serif; vertical-align: middle }

.forminput, .textinput, .radiobutton, .checkbox { font-size: 12px; line-height: 160%; font-family: verdana, helvetica, sans-serif; vertical-align: middle }

.thin { padding: 6px 0px 6px 0px; line-height: 140%; margin: 2px 0px 2px 0px; border-top: 1px solid #FFF; border-bottom: 1px solid #FFF }

.purple { font-weight: bold; color: purple }

.red { font-weight: bold; color: red }

.green { font-weight: bold; color: green }

.blue { font-weight: bold; color: blue }

.orange { font-weight: bold; color: #F90 }

</style>

</head>

<form method="POST" action="cadastrar.asp">

<input type="hidden" name="enviado" value="sim">

<table width='100%' height='85%' align='center'>

<tr>

<td valign='middle'>

<table align='center' cellpadding="4" class="tablefill">

<tr>

<td width="100%" align="center" nowrap="nowrap">

<p align="center">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>

Cadastro de Usuários </b><BR><BR><BR><BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;

Nome: <input type="text" name="nome" class="campo" size="20"><br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sobre Nome: <input type="text" name="snome" class="campo" size="20"><br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Email: <input type="text" name="email" class="campo" size="20"><br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Login: <input type="text" name="login" class="campo" size="20"><br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Senha: <input type="password" name="senha" class="campo" size="20"><br><br>

Confirma a Senha:<input type="password" name="c_senha" class="campo" size="20"><br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Sexo: <select size="1" class="TD" name="sexo">

<option>---( Escolha um&nbsp; Sexo)---</option>

<option value="masculino">Masculino</option>

<option value="feminino">Feminino</option>

<option value="Lesbica">Lesbica</option>

<option value="Gay">Gay</option>

</select><BR><BR>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<input type="submit" class="botao2" name="Enviar" value="Cadastrar" ><BR><BR><BR><BR>

</form> </td>

</tr>

</table>

</td>

</tr>

</table>

<% END IF %>

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,3k
×
×
  • Criar Novo...