Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Procurei na internet váriois metodos de como fazer esse tal sistema, mais não está funcionando, o código que tenho é esse:
LOGIN.PHP
<html>
<head>
<title>Área de Login</title>
<link href="estilo.css" rel="stylesheet" type="text/css"/>
<meta charset="UTF-8" />
</head>
<body>
<div id="formulario_cadastro">
<form action="<?php $_SERVER['PHP_SELF'];?>" method="post" name="form1">
<fieldset>
<legend>Área de Login</legend>
<label>
<span>Login:</span>
<input type="text" name="login" id="username" />
</label>
<label>
<span>Senha:</span>
<input type="password" name="senha" id="senha" />
</label>
<input type="submit" name="entrar" id="entrar" value="Entrar" class="btn"/>
<input type="button" value="Cadastrar" class="btn" onClick="location. href='cadastro.php'"/>
</fieldset>
</form>
</div>
<?php
session_start();
if(isset($_POST['entrar']) && isset($_POST['login']) && $_POST['login'] != "" && isset($_POST['senha']) && $_POST['senha'] != ""){
$login = $_POST['login'];
$senha = $_POST['senha'];
$result = mysql_query("SELECT * FROM `login_session` WHERE `login`='$login' AND `senha`='$senha'");
echo "$login";
}
/*if(mysql_num_rows ($result) > 0 ) {
$_SESSION['login'] = $login;
$_SESSION['senha'] = $senha;
header('location:admincp.php'); }
else{
unset ($_SESSION['login']);
unset ($_SESSION['senha']);
header('location:login.php'); }
*/
?>
</body>
</html>
ADMINCP.PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php session_start();
if((!isset ($_SESSION['login']) == true) and (!isset ($_SESSION['senha']) == true)) {
unset($_SESSION['login']);
unset($_SESSION['senha']);
header('location:login.php'); }
$logado = $_SESSION['login']; ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SISTEMA WEB</title>
</head>
<body>
<table width="800" height="748" border="1">
<tr>
<td height="90" colspan="2" bgcolor="#CCCCCC">SISTEM WEB TESTE
<?php echo" Bem vindo $logado"; ?>
</td>
</tr>
<tr>
<td width="103" height="410" bgcolor="#CCCCCC">MENU AQUI</td>
<td width="546">CONTEUDO E ICONES AQUI</td>
</tr>
<tr> <td colspan="2" bgcolor="#000000"> </td>
</tr>
</table>
</body>
</html>
Se puderem me ajudar agradeço e muito!
o erro é esse:
/applications/core/interface/imageproxy/imageproxy.php?img=http://i60.tinypic.com/2j2j8yh.jpg&key=facb908897fe9caae72bbd76d3fe27181eaa1da04cf775181b345867f1fda12a" alt="2j2j8yh.jpg" />
Carregando comentários...