I received your email and this is what I have left from the class I took and all the help everyone gave me on the forum and from class.
1. config.php below:
<?
$version = "2.0";
$installed = 1;
$use_auth = 1;
// MYSQL DB INFO
$DBHost = "localhost";
$DBName = " ";
$DBUser = " ";
$DBPass = " ";
$TBL_PR = "";
session_start();
?>
2. db.php below:
<?
$db_connection = mysql_connect ($DBHost, $DBUser, $DBPass) OR die (mysql_error());
$db_select = mysql_select_db ($DBName) or die (mysql_error());
?>
3. Here is my checklogin.php which should give you an idea about your session.php:
<?php
require_once("includes/config.php");
require_once("includes/db.php");
session_start();
$query = "SELECT user_id, eid, Title, Department FROM ".$TBL_PR."users WHERE eid='".addslashes($_POST['USER'])."' AND eid_pass='".addslashes(md5($_POST['PASS']))."' LIMIT 1";
$query_result = mysql_query ($query);
while ($info = mysql_fetch_array($query_result))
{
$admin_id = $info['user_id'];
$admin_name = $info['eid'];
$admin_title = $info['Title'];
$admin_dept = $info['Department'];
}
IF(isset($admin_id))
{
$_SESSION['admin_id'] = $admin_id;
$_SESSION['admin_name'] = $admin_name;
$_SESSION['active_user'] = $admin_id;
$_SESSION['admin_title'] = $admin_title;
$_SESSION['admin_dept'] = $admin_dept;
header("Location: " . $_POST['PAGE']);
exit;
}
ELSE
{
die("User Login Failed");
}
?>
4. I cant find functions.php but if you need anything else I can try to gather the information off my version which is a modified version of the calendar.