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

session variables not being stored from login page to index page

Thread began 9/28/2019 6:15 pm by sandy170299 | Last modified 10/02/2019 10:23 pm by sandy170299 | 66 views | 11 replies


My login name (MySQLi Login User) is user_id. I am also referencing this field in my log out page, using the MySQLi Log Out User server behavior (see screen print). It's not working. It's actually not logging me out. I tried a different browser this morning. Session variables DO work, as I'm using them again and again in the application for different processes.

This is my login form:
<form action="index.php" method="post" name="loginUser" onsubmit="MM_validateForm('email','','R','password','','R');return document.MM_returnValue">
<label for="email">Email</label>
<input name="email" type="text" id="email" value="" />
<label for="password">Password</label>
<input name="password" type="password" id="password" value="demo" />
<input name="submit" type="submit" value="Login" />

This is my login user script:
$Authenticate = new WA_MySQLi_Auth($numeroseti);
$Authenticate->Action = "authenticate";
$Authenticate->Trigger = (isset($_POST["submit"]) || isset($_POST["submit_x"]));
$Authenticate->Name = "user_id";
$Authenticate->Table = "users";
$Authenticate->addFilter("user_password_hash", "=", "s", "".((isset($_POST["password"]))?$_POST["password"]:"") ."");
$Authenticate->addFilter("user_email", "=", "s", "".((isset($_POST["email"]))?$_POST["email"]:"") ."");
$Authenticate->storeResult("user_id", "user_id");
$Authenticate->storeResult("acct_number", "acct_number");
$Authenticate->storeResult("user_email", "user_email");
$Authenticate->RememberMe = false;
$Authenticate->SaveLogin = false;
$Authenticate->AutoReturn = false;
$SuccessRedirect = "index.php";
$FailedRedirect = "";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;

This is on index.php:
<?php session_start(); ?>
<?php require_once('Connections/numeroseti.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php require_once('webassist/mysqli/authentication.php'); ?>
$getUser = new WA_MySQLi_RS("getUser",$numeroseti,1);
$getUser->setQuery("SELECT * FROM users WHERE user_id = ?");
$getUser->bindParam("i", "".(isset($_SESSION['user_id'])?$_SESSION['user_id']:"") ."", "-1"); //colname

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...