close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

i can't get the user authentication in mysqli to work

Thread began 10/27/2014 7:05 pm by David | Last modified 10/27/2014 9:59 pm by David | 375 views | 1 replies


i can't get the user authentication in mysqli to work

I'm having no luck with the mysqli user authentication.

First, I don't understand the "login name" field on the loginuser pop-up. What is this and how is it related to the username field in my database of users?

In the code below, if you leave both the username and password blank it takes you to the success page on submission!

<?php require_once('../Connections/AdminPolaris_i.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php require_once('../webassist/mysqli/authentication.php'); ?>
if (isset($_POST["submit"]) || isset($_POST["submit_x"])) {
$Authenticate = new WA_MySQLi_Auth($AdminAndover_i);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "User";
$Authenticate->Table = "users";
$Authenticate->AutoReturn = false;
$SuccessRedirect = "success.php";
$FailedRedirect = "fail.php";
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;

$Recordset1 = new WA_MySQLi_RS("Recordset1",$AdminPolaris_i,1);
$Recordset1->setQuery("SELECT * FROM users");
<div class="container">
<div class="row">
<div class="col-md-12">

<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>

<form id="form1" name="form1" method="POST">
<label for="User">User Name:</label>
<input type="text" name="User" id="User" />
<label for="password">Password:</label>
<input type="text" name="password" id="password" />
<input type="submit" name="submit" id="submit" value="Submit" />


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