Alguem pode me mandar isso !? eu jah tentei aqui... mas num consigo fazer certo !!
Valeu !!!



Posted 26/04/2003, 21:40
Posted 26/04/2003, 22:02
<html><body> <form action="login.asp" method="post"> Nome: <input type="text" name="nome"><br> Senha: <input type="password" name="senha"><br> <input type="submit" value="enviar"> </form> </body></html>
<% nome = Request.Form("nome") senha = Request.Form("senha") 'faça o código que verifique se o nome de usuário e senha são válidos Session("usuario") = nome Response.Redirect "pagina1.asp" %>
<% if Session("usuario") = "" then Response.Write "Olá Visitante" else Response.Write "Olá" & Session("usuario") end if %>
Posted 26/04/2003, 22:19
Posted 26/04/2003, 22:49
<% nome = Replace(Request.Form("nome"),"'","''") senha = Replace(Request.Form("senha"),"'","''") Set conexao = Server.CreateObject("ADODB.Connection") conexao.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("banco.mdb") SQL = "Select * From tabela where nome = '" & nome & "' and senha = '" & senha & "' " Set RS = conexao.Execute(SQL) if Rs.Eof then response.redirect "login.htm" else Session("usuario") = nome end if SQL = "Update tabela Set online = 'online' where nome = '" & nome & "' " Set RS = conexao.Execute(SQL) Response.Redirect "pagina1.asp" %>
<% if Session("usuario") = "" then Response.Write "Olá Visitante" else Response.Write "Olá" & Session("usuario") end if Set conexao = Server.CreateObject("ADODB.Connection") conexao.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("banco.mdb") SQL = "Select status From tabela where online = 'online' " Set RS = conexao.Execute SQL Response.Write "<BR>Usuários online: " do while not RS.Eof Response.Write Rs.Fields("status") "| " rs.MoveNext loop %>
Posted 27/04/2003, 08:04
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)