Jump to content
Fórum Script Brasil
  • 0

Eu Tenho Um Sistema De Login, Mas Ele Naum


Question

form.asp

<form method=post action="login.asp">
<table border=0 width="80%" align=center>
  <tr>
    <td align=right valign=top><font face="Arial" size="2">Usuário:</font></td>
    <td align=left valign=top>
      <font face="Arial" size="2">
    <input type=text name="Login" value="" size=15 maxlength=50 style="{<font-family:Arial; font-size:12}">
    </td>
  </tr>
  <tr>
    <td align=right valign=top><font face="Arial" size="2">Senha:</font></td>
    <td align=left valign=top>
      <font face="Arial" size="2">
    <input type=password name="Senha" value="" size=15 maxlength=50 style="{<font-family:Arial; font-size:12}">
    </td>
  </tr>
  </font>
</table>
<center><input type=submit name=submit value=Logar style="{<font-family:Arial; font-size:12}"></center>
</form></p>
login.asp
<%

set conexao = server.createObject("adodb.connection")

conexao.Open "Provider=Microsoft.JET.OLEDB.4.0; Data Source=" & server.MapPath("login.mdb")

sql = "select * from login where login = '"&request.form("login")&"' and senha = '"&request.form("senha")&"'"

set rsLogin = conexao.execute(sql)

Login = rsLogin("login")
Senha = rsLogin("senha")

if not rsLogin.eof then

Session("login")=TRUE
Session("senha")=TRUE
Response.Redirect"adminname.asp"

else

Response.Redirect"form.asp"

end if

conexao.close
rsLogin.close
set conexao = nothing
set rsLogin = nothing

%>
adminname.asp
<html>
<head>
<title>Cadastro de membros</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<frameset rows="*,140" frameborder="NO" border="0" framespacing="0" cols="*"> 
  <frame name="centro" src="centroadmin.asp">
  <frame name="menu" scrolling="NO" noresize src="menuadmin.asp">
</frameset>
<noframes> 
<body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes> 
</html>

se precisar de outras pags me avisem!!

Me ajudem por favor!!!

Link to post
Share on other sites

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      148681
    • Total Posts
      644503
×
×
  • Create New...