\n";
//echo "\n";
//function signon ($c_user, $c_password )
//{
// connection information
$dbHostName = "localhost.localdomain";
$dbUserName = "eteklogi";
$dbPassword = "doors521";
$dbName = "eteklogics_com_-_webstuff";
$c_pdate = " ";
// make connection to database
mysql_connect($dbHostName, $dbUserName, $dbPassword) or die("Unable to connect to host $dbHostName");
mysql_select_db($dbName) or die( "Unable to select database $dbName");
// Select all the fields in all the records of the Computers table
$query = "SELECT *
FROM users
WHERE userid = '$c_user' and password = '$c_pass'";
// WHERE userid = '$c_user' and password = PASSWORD('$c_pass')";
//print "$query";
$result = mysql_query($query) or die("Error in query: " . mysql_error());
// Determine the number of computers
$number = mysql_numrows($result);
if ($number == 0)
{
print "User name or password is not valid. Please re-enter.";
}
else
{
session_start();
session_register("SESSION");
session_register("SESSION_UNAME");
session_register("SESSION_APPROVED");
$SESSION_UNAME = $c_user;
$u_class = mysql_result($result,0,"class");
if ($u_class == 'D') header("Location: SupportDistributor.php");
else if ($u_class == 'M') header("Location: SupportMaster.php");
else if ($u_class == 'E') header("Location: SupportMaster.php");
else if ($u_class == 'C') header("Location: SupportCustomer.php");
exit();
}
// Close the database connection
mysql_close();
}
//return $number;
//}
?>
eTeklogics - Fixed Asset Management Software, Tool Tracking Software, Inventory Management Systems, GPS, RFID, Barcode Data Collection Systems