Page Not Loading
Posted: Tue Nov 27, 2007 10:23 am
Were with a non profit org trying to send a notice of a new volunteer system out today... but the system is BROKEN
When you login here... http://www.nhforhealthcarepurplepoints.org/ .. NOTHING happens.. below is the process page
When you login here... http://www.nhforhealthcarepurplepoints.org/ .. NOTHING happens.. below is the process page
Code: Select all
<?php
ob_start();
require_once("/home/nhforhealthcare/public_html/main.php");
if(isset($_POST['remember'])){
if($_POST['remember']!="checked"){
setcookie('RememberMe', '', time() - 3600);
unset($_COOKIE['RememberMe']);
} else {
$inTwoMonths = 60 * 60 * 24 * 60 + time();
setcookie('RememberMe', $_POST['username'], $inTwoMonths);
}
}
if(isset($_POST['destination'])){
$destination = $_POST['destination'];
}
if(isset($_POST['username'])){
if(!isset($_POST['password'])){
print('That username/password combination is invalid. Either click here to log in as a different user or sign up and get an account at our signup page.');
include 'login.php';
exit;
} elseif(empty($_POST['password']) || ""==$_POST['password']){
print('That username/password combination is invalid. Either click here to log in as a different user or sign up and get an account at our signup page.');
include 'login.php';
exit;
}
$username = $_POST['username'];
// Get Passwords (Submitted and In database)
$get_pass = mysql_query("SELECT * FROM userbase WHERE username = '{$username}' ");
if(!$get_pass){
print("Error in database connection.");
}
$get_pass = mysql_fetch_array($get_pass);
$database_pass = $get_pass['password'];
$pass = $_POST['password'];
//If password is not vaild display error message
if($pass != $database_pass){
print('That username/password combination is invalid. Either click here to log in as a different user or sign up and get an account at our signup page.');
include 'login.php';
exit;
} elseif($pass == $database_pass) {
//Sign-in
$date = date('m d, Y');
$time = time();
$_SESSION['username'] = $username;
$_SESSION['password'] = $_POST['password'];
$_SESSION['login_time'] = $time;
$_SESSION['login_date'] = $date;
$_SESSION['loggedin'] = 1;
// Send to locaton
if(!$destination){
header("Location: usermenu.php");
echo "<meta http-equiv=\"refresh\" content=\"0;url=usermenu.php\">";
} else {
$destination = base64_decode($destination);
header("Location: $destination");
echo "<meta http-equiv=\"refresh\" content=\"0;url=$destination\">";
}
}
} else {
// Otherwise just show login.php
include 'login.php';
header("Location: login");
}
ob_flush();
?>