prueba así:
Código PHP:
Ver original<?php
include('Connections/MiConexion.php');
// *** Validate request to login to this site.
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) { $_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])) { $loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "autorizacion.php";
$MM_redirectLoginFailed = "login.php";
$MM_redirecttoReferrer = false;
$LoginRS__query=sprintf("SELECT usuario, contrasena FROM usuarios WHERE usuario=%s AND contrasena=%s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
if ($loginFoundUser) {
$loginStrGroup = "";
//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 ); }
}
?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
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;
}
}
?>
Si no te funciona, prueba poniendo la linea
include('Connections/MiConexion.php');
en esta posicion:
session_start();
}
include('Connections/MiConexion.php');