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

Ajudem Com If Len()


leo71

Pergunta

É o seguinte, é que quando eu clico no (OK)

ativa a função -- if request("ok") <> "" then --

Porem, Dentro Dela tem o ERRO (Variavel)

Qe VAi Seguindo Entre as Funções

Eu quero que apos Clicar em (OK)

Execute uma Função LEN()

dentro dela especificando

-- if CODIGO = 0 then --

Usando o ERRO Tipo

-- if len("erro") = 0 then --

Porem, Dá Erro 500

<!-- #INCLUDE file="pack.inc" -->

<HTML>

<HEAD>

  <TITLE>

  <%=titulo_do_site%>

  </TITLE>

  <STYLE>

  a {color:<%=a_link_color%>}

  input {font-family:<%=nome_da_fonte%>; font-size:<%=tamanho_da_fonte%>;}

  table, tr, td {background:<%=tabela_background%>; font-size:<%=tamanho_da_fonte%>}

  </STYLE>

</HEAD>

<BODY STYLE="font-family:<%=nome_da_fonte%> ;font-size:<%=tamanho_da_fonte%> ; color:<%=cor_do_texto%>; background:<%=background_texto%>">

  <CENTER>

  <IMG SRC="../imagens/logo.jpg" ALT="Avatar? Brasil!">

  <BR>

  <BR>

  <script SRC="../menu.js">

  </SCRIPT>

  </CENTER>

  <BR>

  <BR>

  <%=valor_data%>

  <script>

    data = new Date()

    dia = data.getDate()

    mes = (data.getMonth()+1)

    ano = data.getFullYear()

    if(dia < 10)

    {

    dia = "0" + dia

    }

    if(mes < 10)

    {

    mes = "0" + mes

    }

    document.write(dia + "/" + mes + "/" + ano)

  </SCRIPT>

  <BR>

  <%

    set conntemp=server.createobject("adodb.connection")

    cnpath="DBQ=" & server.mappath("rpas.mdb")

    conntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath

    set Con=conntemp.execute("select * from registro") 

    erro = ""

    if request("ok") <> "" then

    if len(trim(request(erro))) < 5 then

      strSQL = "INSERT INTO Registro (login, senha, MSN, yahoo, icq, irc, aim, nivel, email) VALUES ('" & Request.Form("m_login") & "','" & Request.Form("m_senha") & "','" & Request.Form("m_msn") & "','" & Request.Form("m_yahoo") & "','" & Request.Form("m_icq") & "','" & Request.Form("m_irc") & "','" & Request.Form("m_aim") & "',1,'" & Request.Form("m_email") & "')"

      Conntemp.Execute strSQL

    else

      response.write("<BR> "& exec_erro & "<BR>")

    end if

    if trim(request("m_login")) = "" then

    erro = erro & obr_nome & "<BR>"

    b_nome = "<FONT COLOR=yellow>" & b_nome & "</FONT>"

    end if

    if trim(request("m_senha")) = "" then

    erro = erro & obr_senha & "<BR>"

    b_senha = "<FONT COLOR=yellow>" & b_senha & "</FONT>"

    end if

    response.write(erro)

    end if

  %>

  <FORM METHOD=post>

  <%=b_n_m%><BR><BR>

  <%=b_nome%>  <INPUT NAME=m_login  MAXLENGTH=20  SIZE=20>        (<%=b_max%> 20)  <BR>

  <%=b_senha%> <INPUT TYPE=password  NAME=m_senha  MAXLENGTH=10    SIZE=20>    (<%=b_max%> 10)  <BR>

  <%=b_msn%>  <INPUT NAME=m_msn    MAXLENGTH=75  SIZE=20>        (<%=b_max%> 75)  <BR>

  <%=b_yahoo%> <INPUT NAME=m_yahoo  MAXLENGTH=75  SIZE=20>        (<%=b_max%> 75)  <BR>

  <%=b_icq%>  <INPUT NAME=m_icq    MAXLENGTH=15  SIZE=20>        (<%=b_max%> 15)  <BR>

  <%=b_irc%>  <INPUT NAME=m_irq    MAXLENGTH=75  SIZE=20>        (<%=b_max%> 75)  <BR>

  <%=b_aim%>  <INPUT NAME=m_aim    MAXLENGTH=75  SIZE=20>        (<%=b_max%> 75)  <BR>

  <%=b_mail%>  <INPUT NAME=m_email  MAXLENGTH=75  SIZE=20>        (<%=b_max%> 75)  <BR>

  <%=b_site%>  <INPUT NAME=m_site    MAXLENGTH=75  SIZE=20>        (<%=b_max%> 75)  <BR>

  <%=b_estado%> <INPUT NAME=m_estado MAXLENGTH=<%=b_estado_maxlength%> SIZE=20> (<%=b_max%> <%=b_estado_maxlength%>)<BR>

  <%=b_interesse%>

  <BR>

  <TEXTAREA NAME=m_inter STYLE="width:250; height:200">

  </TEXTAREA>

  <BR>

  <INPUT TYPE=submit NAME=ok VALUE="<%=b_registrar%>">

  </FORM>

  <script SRC="../antibanner.js">

  </SCRIPT>

</BODY>

</HTML>

Vlw

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

Erro 500 é um erro genérico do IE.

Abra: Painel de controle - Opções de Internet - Avançadas - desmarque Mostrar Mensagem de erro http amigáveis

e veja o real erro

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.


  • Estatísticas dos Fóruns

    • Tópicos
      152k
    • Posts
      651,7k
×
×
  • Criar Novo...