Thanks for this
I'm running on LAMP (Linux, Apache, MySQL, PHP)
I have set the main "lastaccessed" column via myphpadmin to
timestamp format but am still quite new at coding so will need some
help with the code and positioning. (Use DW to construct the code -
lazy I know but I'm short on time!)
I would think it would go something like this...
if (isset($HTTP_POST_VARS['Username'])) {
$loginUsername=$HTTP_POST_VARS['Username'];
$password=$HTTP_POST_VARS['Password'];
$MM_fldUserAuthorization = "ACCESSPERM";
$MM_redirectLoginSuccess = "/loginsuccess.htm";
$MM_redirectLoginFailed = "/loginfailed.php";
$MM_redirecttoReferrer = false;
$updateSQL = sprintf("UPDATE DBUSERS SET LASTACCESSED=%s",
GetSQLValueString($HTTP_POST_VARS['nowdatefield'], "text"));
mysql_select_db($database_dbcrm1, $dbcrm1);
$LoginRS__query=sprintf("SELECT USER, PASSWORD, ACCESSPERM
FROM DBUSERS WHERE USER='%s' AND PASSWORD='%s'",
get_magic_quotes_gpc() ? $loginUsername :
addslashes($loginUsername), get_magic_quotes_gpc() ? $password :
addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $dbcrm1) or
die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = mysql_result($LoginRS,0,'ACCESSPERM');
Probably way off but at least I'm trying!