close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQLi Log In not working

Thread began 11/24/2017 7:23 pm by Francois | Last modified 12/01/2017 9:13 am by Ray Borduin | 2178 views | 12 replies |

Francois

MySQLi Log In not working

Win 10, DW CC 2014, installed extensions OK, have a Log In page, form with post method, input type email, input type password, button type button - changing to submit, have not been able to make it work, maybe this will make a difference. Nope, the page is submitting but not redirecting, going back to itself and can't display itself.
I have a MySQLi connection.
<?php require_once('../Connections/IFRMi.php'); ?>
<?php require_once('../webassist/mysqli/authentication.php'); ?>
<?php
if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) {
$Authenticate = new WA_MySQLi_Auth($IFRMi);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "";
$Authenticate->Table = "users";
$Authenticate->addFilter("Email", "=", "s", "".(((isset($_POST["email"]))?$_POST["email"]:"")) ."");
$Authenticate->addFilter("Password", "=", "s", "".WA_SHA1Encryption((((isset($_POST["password"]))?$_POST["password"]:""))) ."");
$Authenticate->storeResult("Email", "UserEmail");
$Authenticate->AutoReturn = false;
$SuccessRedirect = "../members/profile.php";
$FailedRedirect = "access-denied.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;
$Authenticate->execute();
}
?> and
<form name="login" class="w3-container" method="post">

<h1>Log In</h1>
<h2 class="w3-text-red">Required *</h2>

<div class="w3-cell-row w3-section">
<div class="w3-container w3-cell w3-cell-middle" style="width:150px;"><label class="w3-right">Email: * </label></div>
<div class="w3-container w3-cell w3-cell-middle w3-rest">
<input name="email" type="email" class="w3-input w3-border w3-round-large w3-sand" style="width: 200px;" />
</div>
</div>

<div class="w3-cell-row w3-section">
<div class="w3-container w3-cell w3-cell-middle" style="width:150px;"><label class="w3-right">Password: * </label></div>
<div class="w3-container w3-cell w3-cell-middle">
<input name="password" type="password" class="w3-input w3-border w3-round-large w3-sand" style="width: 200px;" />
</div>
</div>

<div class="w3-container w3-center" style="max-width:400px;">
<a href="loginforgot.php" title="forgot password?" target="_top">forgot password?</a>
</div>


<p><input name="remember" type="checkbox" class="w3-check" value="Remember" />
<label>Remember my information</label></p>
<p><input name="autolog" type="checkbox" class="w3-check" value="AutoLog" />
<label>Log me in automatically</label></p>

<p><button type="submit" class="w3-btn w3-round-large w3-khaki w3-ripple w3-hover-yellow"> Log In</button></p>

</form>

Sign in to reply to this post

Ray BorduinWebAssist

Try using the button press trigger instead of the current page submit trigger. If you still have issues I'd need FTP access and a url to debug.

Sign in to reply to this post
Did this help? Tips are appreciated...

Francois

"button press trigger" does not exist, I'm attaching a screenshot of the available options.

Sign in to reply to this post

Ray BorduinWebAssist

Give your <button> a name attribute and then it should show up in the list.

Sign in to reply to this post
Did this help? Tips are appreciated...

Francois

I added the attribute name and id, the server behavior trigger is "Button: login pressed" but there is no change, the page displays This page isn’t working - localhost is currently unable to handle this request.- HTTP ERROR 500When I refresh it brings the log in page again.

Sign in to reply to this post

Ray BorduinWebAssist

Can I get FTP access and a username and password to test with? I'll debug it and let you know what the issue was.

Sign in to reply to this post
Did this help? Tips are appreciated...

Francois

Here you go

Sign in to reply to this post

Ray BorduinWebAssist

There appears to be a bug with using dollar signs ($) in passwords. I'll have to do an update to get it corrected.

Sign in to reply to this post
Did this help? Tips are appreciated...

Ray BorduinWebAssist

This issue should be fixed. You can download and install the latest version of the extension to correct it.

Sign in to reply to this post
Did this help? Tips are appreciated...

Francois

I'm getting this error removing the MySQLi extension:
While executing timer in WA_uninstall2.htm, the following JavaScript error(s) occurred:
At line 168 of file: "C:\Users\Francois Daoust\AppData\Roaming\Adobe\Dreamweaver CC 2014.1\en_US\Configuration\WA_Installer\Library2\WA_XML.js": XMLString has no properties

I've "removed" the extension, downloaded the new one and installed it, no change to the log in page.

Sign in to reply to this post
loading

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

Content

rating

Layout

rating

Ease of use

rating

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