/* Check User Script */
//include 'db.php';
// Convert to simple variables
if (isset($_POST['submit'])){
$username = $_POST['username'];
$password = $_POST['password'];
if ((!$username) || (!$password)){
$error = 'Please enter ALL of the information!';
include('freetools_eworkroom_error.php');
exit();
}else{
// Convert password to md5 hash
//$password = md5($password);
// check if the user info validates the db
//$sql = mysql_query("SELECT * FROM accreditedtrainers WHERE username='$username' AND password='$password'");
//$login_check = mysql_num_rows($sql);
if (($username == "tools-25" && $password == "deepen")){
session_start();
$_SESSION['authorized'] = 'TRUE';
$_SESSION['firstcommand'] = 'TRUE';
header("Location: eworkroom/index.php");
}else{
$error = 'Login Failed!
The username and password does not match or you have not been registered!
Please try again!
';
//include('freetools_eworkroom_error.php');
}
}
}
?>