MySqli Login stays on same page
I just set up a page to use as a login, but when I attempt to login, it just stays on the same page and tacks on:
/?username=admin&password=admin&LOGIN=LOGIN
to the end of the url. It never redirects to the success page. The same thing happens when it fails.
I just have a simple form (see below)...and then using the webassist server behavior Login User.
If i change the method to post, it just goes to the failed page no matter what username and password i put in the fields.
Any thoughts?
<form action="" method="get" name="user">
<div>
<input id="username" name="username" type="text" placeholder="Username...">
</div>
<div>
<input id="password" name="pwd" type="password" placeholder="Password...">
</div>
<div>
<input name="LOGIN" type="submit" value="LOGIN">
</div>
</form>
This is what was automatically added to the page.
<?php require_once('../Connections/Claudia.php'); ?>
<?php require_once('../webassist/mysqli/authentication.php'); ?>
<?php
$Authenticate = new WA_MySQLi_Auth($Claudia);
$Authenticate->Action = "authenticate";
$Authenticate->Trigger = ($_SERVER["REQUEST_METHOD"] === "POST");
$Authenticate->Name = "user";
$Authenticate->Table = "users";
$Authenticate->addFilter("username", "=", "s", "".((isset($_GET["username"]))?$_GET["username"]:"") ."");
$Authenticate->addFilter("password", "=", "s", "".((isset($_GET["pwd"]))?$_GET["pwd"]:"") ."");
$Authenticate->RememberMe = (true);
$Authenticate->SaveLogin = (true);
$Authenticate->AutoReturn = false;
$SuccessRedirect = "home.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;
$Authenticate->execute();
?>