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


$SuccessRedirect is redirecting to wrong page

Thread began 9/04/2015 11:21 am by Sarre | Last modified 9/04/2015 2:16 pm by Ray Borduin | 284 views | 2 replies |


$SuccessRedirect is redirecting to wrong page


I have a question regarding redirect after login. Users are redirected to wrong page. Although $SuccessRedirect is set, users are not
landing on main.php but on another subpage.

<?php require_once('Connections/conn.php'); ?>
<?php require_once('webassist/mysqli/authentication.php'); ?>
if (isset($_POST["loginbutton"]) || isset($_POST["loginbutton_x"])) {
$Authenticate = new WA_MySQLi_Auth($conn);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "user";
$Authenticate->Table = "users";
$Authenticate->addFilter("password", "=", "s", "".((isset($_POST["pass"]))?sha1($_POST["pass"]):"") ."");
$Authenticate->addFilter("email", "=", "s", "".((isset($_POST["user"]))?$_POST["user"]:"") ."");
$Authenticate->AutoReturn = false;
$SuccessRedirect = "main.php";
$FailedRedirect = "loginerror.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;

Anobody have any clues?


Sign in to reply to this post

Ray BorduinWebAssist

Is it possible the main.php page is redirecting them to the other page? What is the other page? There was an issue in previous versions that it was ignoring the setting:

$Authenticate->AutoReturn = false;

and returning people to the last restricted page they tried to visit even when it was turned off. That should be fixed in the latest version of authenication.php.... I've attached it so you can try that. If that fixes it, reinstall the latest version of the extension so the new version is used in future applications by default.

Attached Files
Sign in to reply to this post


Hi Ray,

Thank you for replying.

There is no redirect on the main.php, and the page it lands on seems random. Have no idea why that page was chosen. But anyway, the updated version of Authentication.php did the trick.

Thank you for the quick support!

Best regards,

Sign in to reply to this post

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