Jump to content

Juliano8020

Members
  • Content count

    1
  • Joined

  • Last visited

Everything posted by Juliano8020

  1. Olá amigos!!! sou novo no fórum ..me chamo Juliano Oliveira... Estou com um problema para criar um painel de login no Dreamweaver CS6, fiz o seguinte... criei um banco de dados com a seguinte tabela no php my admin : depois eu conectei o php, e fiz o seguinte: e montei o formulário de login : Fiz tudo bem certinho e revisei diversas vezes, mais ta dando esse problema quando vou abrir no navegador: o código esta da seguinte forma: <?php require_once('Connections/comexao.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } ?> <?php // *** Validate request to login to this site. if (!isset($_SESSION)) { session_start(); } $loginFormAction = $_SERVER['PHP_SELF']; if (isset($_GET['accesscheck'])) { $_SESSION['PrevUrl'] = $_GET['accesscheck']; } if (isset($_POST['uso_email'])) { $loginUsername=$_POST['uso_email']; $password=$_POST['usu_senha']; $MM_fldUserAuthorization = ""; $MM_redirectLoginSuccess = "index.php"; $MM_redirectLoginFailed = "erro_login.php"; $MM_redirecttoReferrer = false; mysql_select_db($database_comexao, $comexao); $LoginRS__query=sprintf("SELECT usu_email, usu_senha FROM teste WHERE usu_email=%s AND usu_senha=%s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); $LoginRS = mysql_query($LoginRS__query, $comexao) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); if ($loginFoundUser) { $loginStrGroup = ""; if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();} //declare two session variables and assign them $_SESSION['MM_Username'] = $loginUsername; $_SESSION['MM_UserGroup'] = $loginStrGroup; if (isset($_SESSION['PrevUrl']) && false) { $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; } header("Location: " . $MM_redirectLoginSuccess ); } else { header("Location: ". $MM_redirectLoginFailed ); } } ?> <form ACTION="<?php echo $loginFormAction; ?>" method="POST" name="formulario" id="formulario"> <table width="293" cellspacing="10"> <tr> <td>E-mail:</td> <td><label for="uso_email"></label> <input type="text" name="uso_email" id="uso_email"></td> </tr> <tr> <td>Senha:</td> <td><label for="usu_senha"></label> <input type="password" name="usu_senha" id="usu_senha"></td> </tr> <tr> <td> </td> <td><input type="submit" name="button" id="button" value="Entrar"></td> </tr> </table> </form> Alguém poderia me dar uma luz? :huh: :huh: :huh: :huh: :huh: :rolleyes: :rolleyes: :rolleyes: :rolleyes: :rolleyes:
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.