close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Mysqli login

Thread began 1/12/2015 11:18 pm by David | Last modified 1/13/2015 6:19 am by Jason Byrnes | 609 views | 1 replies |

David

Mysqli login

I get the following error when trying to run a page with the login mysqli behavior: Fatal error: Call to a member function getColumnVal() on a non-object in /home/acmeco5/public_html/AcmeComputingCart/login.php on line 10

I am able to pull up data from the table, so I know that mysqli is enabled.

Here is the code:

<?php require_once('Connections/AdminAndover_i.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php require_once('webassist/mysqli/authentication.php'); ?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$Authenticate = new WA_MySQLi_Auth($AdminAndover_i);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "UserID";
$Authenticate->Table = "users";
$Authenticate->addFilter("UserID", "=", "i", "".($Recordset1->getColumnVal("UserID")) ."");
$Authenticate->addFilter("Password", "=", "s", "".($Recordset1->getColumnVal("Password")) ."");
$Authenticate->storeResult("UserID", "UserID");
$Authenticate->AutoReturn = false;
$SuccessRedirect = "yes.php";
$FailedRedirect = "no.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();
}
?>
<?php


$Recordset1 = new WA_MySQLi_RS("Recordset1",$AdminAndover_i,1);
$Recordset1->setQuery("SELECT * FROM users");
$Recordset1->execute();?>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>

<form name="form1" method="POST" >

<input id='UserID' type="text">
<input id='Password' type="password">
<input type="submit">
</form>

</body>
</html>

Sign in to reply to this post

Jason ByrnesWebAssist

you are using recordset bindings in the login behavior. you should be binding to the form elements.

your form elements, though, are not properly formatted. they specify only the type and ID, but do not specify the name. you should add a name attribute, for example:
<input name="username" id="username" type="text">

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

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