Hi,
In my php script for verifying logins i get this error:
Fatal error: input in flex scanner failed in /emcb/conf/users/includes on line 1
Here is the source code from my script, it is required in every file to verify username, password and access level, and the vars frmUsername, frmPassword are from a web form and username, password and access_level are from the included file.
Does anyone know what this means?
--- authlib.php ---
<?php
// Emcb Authentication System 1.0
//
// Library File - Do Not Edit
function login() {
// Store the username and password from the form
$use_username = "$frmUsername";
$use_password = "$frmPassword";
// Ser the data path for include files
$lib_user_path = "/emcb/conf/users/includes";
// Set the top level of the web tree
$lib_public_html = "/emcb/services/http";
// Set the full path/filename for requiring
$username_file = "$lib_user_path" . "/$username";
// If the username file does not exist display User Unknown error message
if (!require($username_file)) {
echo "Invalid Username Specified. Please Go Back...";
}
// If the user exists ckeck the password
else {
// Set the full path including include file extention
$user_data = "$lib_user_path" . "/" . "$use_username" . ".inc";
// Require the data file for verification
require($user_data);
// Hash the password from the form
$try_password = md5($use_password);
// Check if the password is correct
if ($try_password == "$password") {
// The password is correct
echo "$welc_msg";
// What access level does the user have
if ($access_level == "root" or $access_level == "admin" or $access_level == "mod" or $access_level == "op") {
// This user is not a meer-user
echo "<br>Access Level: $access_level\n";
}
else {
// The user is a normal user
echo "<br>Access Level: $access_level\n";
// Now start the session for all users
$session_username = $frmUsername;
$session_password = md5($frmPassword);
$session_accesslvl = $access_level;
function init_session() {
$frmUsername = $session_username;
$frmPassword = $session_password;
$access_level = $session_accesslvl;
session_start();
session_register("frmUsername");
session_register("frmPassword");
session_register("access_level");
exit;
}
init_session();
}
}
}
}
login();
?>
--- authlib.php ---
Cheers,
Elfyn