Hola mi problema es este
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/67/7874767/html/login.php:1) in /home/content/67/7874767/html/login.php on line 37
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/67/7874767/html/login.php:1) in /home/content/67/7874767/html/login.php on line 37
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start(); Esta es la linea 37
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['user'])) {
$loginUsername=$_POST['user'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "panel.php";
$MM_redirectLoginFailed = "loginfail.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_schools, $schools);
$LoginRS__query=sprintf("SELECT `user`, password FROM school WHERE `user`=%s AND password=%s",
GetSQLValueString($loginUsername, "-1"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $schools) 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 );
}
}
?>
Este codigo que esta aqui es para iniciar sesión en la pagina
Gracias