Hi, I'm pulling the last few strands of my hair out with this problem.
I'm working on a MAC with APACHE PHP and MYSQL through the MAMP software. I'm developing a site http://universalmaritime.com and i have come across the white screen of death problem on the login page. (login is at the bottom of the slide show on the homepage)
This is the code in dreamweaver at the top of the login page that is giving me the problem i think.
<?php require_once('Connections/USERS.php'); ?>
<?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['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "admin_home.php";
$MM_redirectLoginFailed = "error.php";
$MM_redirecttoReferrer = true;
mysql_select_db($database_USERS, $USERS);
$LoginRS__query=sprintf("SELECT username, password FROM users WHERE username='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $USERS) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && true) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
Does anybody have the faintest idea of what the problem may be cause i don't. I just want this very simple log in page to work. OR is there a way to create an admin page with one username and password where databases are not involved. PLEASE HELP ME!!!!
THANKS ALOT
I'm working on a MAC with APACHE PHP and MYSQL through the MAMP software. I'm developing a site http://universalmaritime.com and i have come across the white screen of death problem on the login page. (login is at the bottom of the slide show on the homepage)
This is the code in dreamweaver at the top of the login page that is giving me the problem i think.
<?php require_once('Connections/USERS.php'); ?>
<?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['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "admin_home.php";
$MM_redirectLoginFailed = "error.php";
$MM_redirecttoReferrer = true;
mysql_select_db($database_USERS, $USERS);
$LoginRS__query=sprintf("SELECT username, password FROM users WHERE username='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $USERS) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && true) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
Does anybody have the faintest idea of what the problem may be cause i don't. I just want this very simple log in page to work. OR is there a way to create an admin page with one username and password where databases are not involved. PLEASE HELP ME!!!!
THANKS ALOT