close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

how to store successful logins

Thread began 1/15/2020 10:51 am by CraigR | Last modified 1/15/2020 2:28 pm by CraigR | 30 views | 4 replies

CraigRBeta Tester

how to store successful logins

I have a site which uses security assist as a basis or its login page.
the login page checks the members table and on authentication, the members is permitted site access

i wish to store successful logins in a separate table so i can see how often particular members access the site.
so far this has been quite straightforward, and the login form and the insert works well


$WA_Auth_Parameter = array(
"connection" => $mysqli,
"database" => $database_mysqli,
"tableName" => "tblmembers",
"columns" => explode($WA_Auth_Separator,"MemberEmail".$WA_Auth_Separator."MemberPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["emailaddress"]))?$_POST["emailaddress"]:"")  ."".$WA_Auth_Separator."".sha1(((isset($_POST["userpassword"]))?$_POST["userpassword"]:""))  .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"MemberID".$WA_Auth_Separator."userLevel"),
"sessionNames" => explode($WA_Auth_Separator,"MemberID".$WA_Auth_Separator."userLevel"),
"successRedirect" => "",
//"successRedirect" => "/index.php",
"failRedirect" => "",
"gotoPreviousURL" => FALSE,
"keepQueryString" => TRUE
if((isset($_POST["LogIn"])) && (WA_Auth_RulePasses("Admins and members"))) { // login success
 //if(""=="") {
$InsertQuery = new WA_MySQLi_Query($mysqli);
$InsertQuery->Action "insert";
$InsertQuery->Table "tbllogin";
$InsertQuery->bindColumn("MemberID""i""".$_SESSION['MemberID']  ."""WA_DEFAULT");
$InsertGoTo "";
  if (
function_exists("rel2abs")) $InsertGoTo $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";

However the problem i have is as follows...

if i use the login form with login.php as the url, both blocks of code execute and the login table is populated

if i have been redirected to the login form from say the index page which has restricted access, the url will read /login.php?accesscheck=%2Findex.php%3F

if i complete the login form here, the insert block does not run.

i tries setting gotoPreviousURL to false, but it doesn't seem to make any difference

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...