login simples...
os dados estão chegando ate a pagina corretamente... mas por algum motivo... o login não esta sendo feito correto....
acho que é alguma coisa na consulta sql...
os 2 campos em questão são do tipo varchar la no mysql...
<?php
$login = $_POST["login"];
$senha = $_POST["senha"];
$conexao = mysql_connect("localhost","root","");
mysql_select_db("amg", $conexao)or die ("erro de conexao com o banco de dados");
$sql = "SELECT * FROM catalogos WHERE login = '$login' AND senha = '$senha'";
$query = mysql_query($sql, $conexao) or die (mysql_error());
if($query > 1){
$login_user = true;
}
else
{
$login_user = false;
}
echo "Bem vindo(a) ";
echo $login;
?>
<!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">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AMGCorporate</title>
<style type="text/css">
.geral
{
width:800px;
margin:0 auto;
}
body,td,th {
color: #000000;
}
body {
background-color: #FFFFFF;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #666666;
text-decoration: none;
}
a:active {
color: #333333;
text-decoration: none;
}
</style>
</head>
<body>
<div align="center" class="geral">
<div class="conteudo">
<table width="795" border="0">
<tr>
<td width="263" height="98"> </td>
<td width="265" align="center" valign="top">
<img src="amg.jpg" /> </td>
<td width="253"> </td>
</tr>
<tr>
<td>
<div align="center"><img src="LOGO FELLIPE KREIN SÓ SALAMANDRA JPEG.jpg" /> </div></td>
<td valign="top"><div align="center"><b>Marcelo Guedes </b><br />
Marcelo.guedes@amgcorporate.com.br<br />
Nextel: (11)7891-5347 - ID 55*9*59641<br />
Celular: (19)8162-7907 - (11)7152-0283 </div></td>
<td>
<div align="center"><img src="LOGO JULIA ARNOLD SÓ GATINHA JPEG.jpg" /> </div></td>
</tr>
<tr>
<td height="92" align="center" valign="top">
<img src="LOGO FELLIPE KREIN COMPLETO JPEG.jpg" width="250" /> </td>
<td valign="top"> </td>
<td align="center" valign="top">
<div align="center"><img src="LOGO JULIA ARNOLD COMPLETO JPEG.jpg" /> </div></td>
</tr>
<tr>
<td> </td>
<td align="center" valign="top">
<?php
if($login_user = true){
?>
link 1 true
<?php
}else{
?>
link 2 false
<?php
}
?>
</td>
</tr>
</table>
<td> </td>
</tr>
</table>
</div>
</div>
</body>
</html>Discussão (2)
Carregando comentários...