Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/04/2005, 22:47
index000
 
Fecha de Ingreso: febrero-2005
Mensajes: 183
Antigüedad: 13 años, 9 meses
Puntos: 0
Login en php (Problemas)

Hola, este es uno de mis primeros post, estoy necesitando ayuda.
Este codigo tiene un error en la line 31 pero nose que es, me ayudan?

<?php require_once('../Connections/test.php'); ?>
<?php
mysql_select_db($database_test, $test);
$query_Recordset2 = "SELECT * FROM lucho";
$Recordset2 = mysql_query($query_Recordset2, $test) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);

// *** Validate request to login to this site.
session_start();

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
$GLOBALS['PrevUrl'] = $accesscheck;
session_register('PrevUrl');
}

if (isset($_POST['user'])) {
$loginUsername=$_POST['user'];
$password=$_POST['pass'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "users.php";
$MM_redirectLoginFailed = "login.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_test, $test);

$LoginRS__query=sprintf("SELECT user, pass FROM lucho WHERE user='%s' AND pass='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));

$LoginRS = mysql_query($LoginRS__query, $test) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";

//declare two session variables and assign them
$GLOBALS['MM_Username'] = $loginUsername;
$GLOBALS['MM_UserGroup'] = $loginStrGroup;

//register the session variables
session_register("MM_Username");
session_register("MM_UserGroup");

if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>


codigo html bla bal bla

<?php
mysql_free_result($Recordset2);
?>