Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

blink

Segurança

Recommended Posts

tenho um local de login e senha

se a pessoa digitar (' or)ela entra como posso cancelar isso?

 

<% if session("codCliente") <> "" then %>	<table border="0" cellpadding="0" cellspacing="0" width="130">	<tr><th>Apartir de agora você pode ouvir todas as músicas que você mais gosta!</th></tr>	<tr><th><a href="logout.asp">Sair da seção <%= Session("nome")%></th></tr>    </table><% elseif session("codCliente") = "" then %>	<table border="0" cellpadding="0" cellspacing="0" width="130">	<tr><th>Já é cadastrado? Digite seu login e senha</th></tr>	</table>  <form method=post action=validalogin.asp>  <input type=hidden name=enviando value=sim>  <table border="0" cellpadding="0" cellspacing="0" width="130">  <tr>  <th>Login</th>  </tr>  <tr></tr>  <th><input type=text name=login size="16" style="font-size: 11 px; font-family: Tahoma; border-style: solid; border-width: 1"></th>  </tr>  <tr></tr>  <th>Senha</th>  </tr>  <tr></tr>  <th><input type=password name=senha size="16" style="font-size: 11 px; font-family: Tahoma; border-style: solid; border-width: 1"></th>  </tr>  <tr></tr>  <th colspan=2 align=center>  <input border="0" src="ok.gif" name="ok" type="image"></th>  </tr>  </table>  </form><%end if%>

 

 

Obrigado pessoal

Compartilhar este post


Link para o post
Compartilhar em outros sites

ok. ai esta...

 

 

<%	AbreConexao  Dim ComandoSQL  'String SQL  Dim Rs  'Resultado do select  ComandoSQL = "Select * FROM Clientes WHERE login = '" & Request.Form("login") & "' "  ComandoSQL = ComandoSQL & "AND senha='" & Request.Form("senha") & "' "  Set Rs = conexao.execute(ComandoSQL)  If not Rs.eof then	'encontrou o registro procurado 	 session("codCliente") = Rs("codCliente") 	 Session("nome")	= Rs("nome") 	 Session("email") = Rs("email") 	 Response.Redirect("principal.asp")    Else 	 Response.Redirect("index.asp")    End if       FechaConexao%>

Fui...valeu

Compartilhar este post


Link para o post
Compartilhar em outros sites
<%	AbreConexao  Dim ComandoSQL  'String SQL  Dim Rs  'Resultado do select  ComandoSQL = "Select * FROM Clientes WHERE login = '" & replace(Request.Form("login"),"'","''") & "' "  ComandoSQL = ComandoSQL & "AND senha='" & replace(Request.Form("senha"),"'","''") & "' "  Set Rs = conexao.execute(ComandoSQL)  If not Rs.eof then	'encontrou o registro procurado 	 session("codCliente") = Rs("codCliente") 	 Session("nome")	= Rs("nome") 	 Session("email") = Rs("email") 	 Response.Redirect("principal.asp")    Else 	 Response.Redirect("index.asp")    End if       FechaConexao%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.