close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Login Form not working

Thread began 3/11/2019 6:45 am by Raza | Last modified 3/28/2019 8:50 am by Ray Borduin | 2659 views | 24 replies |

Raza

Login Form not working

hello
my MySQLi Server Behaviors Login Form does not login I am attaching my login script please check it

Attached Files
account.php
login.php
Sign in to reply to this post

Ray BorduinWebAssist

Your trigger is using $_POST[] but your comparisons are using $_GET[], and your <form> tag doesn't set a method, so it is using $_GET[] by default.

The best solution is to update your <form> and add method="post" and then update any references of $_GET to $_POST

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

Raza

Thanks for Reply
I've updated my login as you said but still form does't login unfortunately

Sign in to reply to this post

Ray BorduinWebAssist

I'd need to look at the page to determine why. If I don't spot a problem I may also need FTP access and a URL to test.

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

Raza

I am working on xampp.I am send you all files & folder including .sql file you check on your server

Sign in to reply to this post

Ray BorduinWebAssist

Your login page still has:

php:
$Authenticate->addFilter("email", "=", "s", "".((isset($_GET["email"]))?$_GET["email"]:"")  ."");

$Authenticate->addFilter("password", "=", "s", "".((isset($_GET["password"]))?$_GET["password"]:"")  ."");


it needs to use $_POST like:

php:
$Authenticate->addFilter("email", "=", "s", "".((isset($_POST["email"]))?$_POST["email"]:"")  ."");

$Authenticate->addFilter("password", "=", "s", "".((isset($_POST["password"]))?$_POST["password"]:"")  ."");
Sign in to reply to this post
Did this help? Tips are appreciated...

Raza

check it again
<?php
$Authenticate = new WA_MySQLi_Auth($stConn);
$Authenticate->Action = "authenticate";
$Authenticate->Trigger = (isset($_POST["login"]) || isset($_POST["login_x"]));
$Authenticate->Name = "login";
$Authenticate->Table = "`user`";
$Authenticate->addFilter("email", "=", "s", "".((isset($_POST["email"]))?$_POST["email"]:"") ."");
$Authenticate->addFilter("password", "=", "s", "".((isset($_POST["password"]))?$_POST["password"]:"") ."");
$Authenticate->storeResult("email", "email");
$Authenticate->storeResult("password", "password");
$Authenticate->RememberMe = (false);
$Authenticate->SaveLogin = (false);
$Authenticate->AutoReturn = true;
$SuccessRedirect = "account.php";
$FailedRedirect = "login.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();
?>

Sign in to reply to this post

Ray BorduinWebAssist

That looks correct.

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

Raza

but it is still not login

Sign in to reply to this post

Ray BorduinWebAssist

Please attach the current page. If you can upload to a live site that would help so I could get FTP access and debug.

Sign in to reply to this post
Did this help? Tips are appreciated...
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...