close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Login Page not doing anything

Thread began 2/05/2019 4:04 am by stevenmcgough | Last modified 4/10/2020 10:36 am by Ray Borduin | 2029 views | 14 replies |

stevenmcgough

Login Page not doing anything

Hi,
It has been a while since I have used MySQLi to work with a site. I have a simple database with a table called "User" - which holds simple login info (user/password etc) I have a done a very straighforward form page to test this login procedure - but on viewing the page - it does nothing at all - no errors, just as if there is nothing chacking or happening at all?

I have pasted the page code below to see if anythjing stands out? - the authentication.php file has been created. Thanks in advance for any replies...

Steve



<?php require_once('Connections/Timesheet.php'); ?>
<?php require_once('webassist/mysqli/authentication.php'); ?>
<?php
$Authenticate = new WA_MySQLi_Auth($Timesheet);
$Authenticate->Action = "authenticate";
$Authenticate->Trigger = ((((isset($_GET["Submit"]))?$_GET["Submit"]:"") != ""));
$Authenticate->Name = "PPLLogin";
$Authenticate->Table = "`User`";
$Authenticate->addFilter("PPL", "=", "s", "".((isset($_GET["User"]))?$_GET["User"]:"") ."");
$Authenticate->addFilter("password", "=", "s", "".((isset($_GET["password"]))?$_GET["password"]:"") ."");
$Authenticate->storeResult("PPL", "Name");
$Authenticate->RememberMe = (false);
$Authenticate->SaveLogin = (false);
$Authenticate->AutoReturn = false;
$SuccessRedirect = "TimeEntryForm/index.php";
$FailedRedirect = "http://www.google.com";
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();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<form action="" method="get" name="form1" id="form1">
<p>
<label for="User">User:</label>
<input type="text" name="User" id="User">
</p>
<p>
<label for="password">Password:</label>
<input type="password" name="password" id="password">
</p>
<p>
<input type="button" name="Submit" id="Submit" value="Button">
</p>
</form>
</body>
</html>

Sign in to reply to this post

Ray BorduinWebAssist

Nothing stands out... The issue could be on the page: TimeEntryForm/index.php

Maybe that page isn't properly identifying if a user is logged in and it returns them to the login page? Maybe the site is having trouble saving session variables in general?

I'd need FTP access and a URL to reproduce to figure out exactly what is going wrong.

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

Hans

Hi Ray, I have the same issue on the initial login page. However, if I access another restricted page directly, the redirect works as designed and takes me back to the initial login page and the login attempt is then successful. What am I doing wrong? Thank you, Hans

Sign in to reply to this post

Ray BorduinWebAssist

I'm not sure. Can I get a url with steps to reproduce? If I see it then something might come to mind.

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

Hans

Thanks, Ray. sending credentials privately.

Sign in to reply to this post

Ray BorduinWebAssist

Odd I haven't seen that before.... Can I get FTP access to debug? I think it might be an issue with the autentication.php file, but I'm going to have to go in and do some testing to figure out why it happens.

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

Hans

private

Sign in to reply to this post

Ray BorduinWebAssist

I see the issue. It is because you are using the "current page submit" trigger and you are on the index page and don't have a page specified in the url. The easiest solution is to just move to the button press trigger.

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

Hans

Thanks, Ray, I picked "any form post" from the Trigger menu and it seems to be working now. Is this what you meant with the "button press trigger"?

Sign in to reply to this post

Ray BorduinWebAssist

That should work. I was talking about the Button Press: Button Name trigger that should be there for the login button, but either would work in this case.

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