intltech Posted June 25, 2012 Share Posted June 25, 2012 I am seeking a simple solution to capture user logins. I already have a table created for UserId, UserName, IPaddress. MySQL has field for date/time which auto populates. Any help is appreciated! Quote Link to comment Share on other sites More sharing options...
requinix Posted June 25, 2012 Share Posted June 25, 2012 Well, the obvious thing would be to add "insert a row into that table" code in the login code... Quote Link to comment Share on other sites More sharing options...
intltech Posted June 25, 2012 Author Share Posted June 25, 2012 Yes, exactly. The login form would need to submit the data to the new table. I am unsure how to do this. Quote Link to comment Share on other sites More sharing options...
requinix Posted June 25, 2012 Share Posted June 25, 2012 ...With code? Exactly what don't you know how to do? New to PHP maybe? Where'd the stuff you have now come from? Quote Link to comment Share on other sites More sharing options...
intltech Posted June 25, 2012 Author Share Posted June 25, 2012 I apologize, yes. I am new to PHP as well as WD_DataAssist, without their software, so, I need to hard code it. The DataAssist make sit extremely confusing to follow. Quote Link to comment Share on other sites More sharing options...
requinix Posted June 25, 2012 Share Posted June 25, 2012 Unless there's someone here that's familiar with that thing (which Google doesn't seem to know about) then you'll be pretty much on your own. You'll have to find the place that handles logins and extend it to add to the database when it does so. Maybe there's some online support you can find? Quote Link to comment Share on other sites More sharing options...
intltech Posted June 25, 2012 Author Share Posted June 25, 2012 Thank you for your patience and understanding. My online searches for assistance with this system led me here. I am open to any suggestions. Quote Link to comment Share on other sites More sharing options...
litebearer Posted June 25, 2012 Share Posted June 25, 2012 Where did you acquire WD_DataAssist? Quote Link to comment Share on other sites More sharing options...
intltech Posted June 25, 2012 Author Share Posted June 25, 2012 Unfortunately, the site was already built on this platform by a previous developer. I got the deal to make a ton of modifications/improvements. I have been able to successfully complete about 80% of the requests with limited PHP knowledge. The site was built using WebAssist but, for my purposes, not worht purchasing the licensing for this. Simply need to modify code directly. Quote Link to comment Share on other sites More sharing options...
litebearer Posted June 25, 2012 Share Posted June 25, 2012 start by locating the file that processes the login. show that file here. Quote Link to comment Share on other sites More sharing options...
intltech Posted June 25, 2012 Author Share Posted June 25, 2012 Okay, thank you for taking a look at this. I have tried to attach as a file, but unable to. So, I have pasted the code directly below. What my ultimate goal is, to capture and display login report when each user has logged into the system (UserName, UserID, IP Address, Date/Time). I have the report created from test data already. Just unable to make the login submit to the new db table. CODE: <?php require_once( 'Connections/DATABASE.php' ); ?> <?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?> <?php if($_SERVER["REQUEST_METHOD"] == "POST"){ $WA_Auth_Parameter = array( "connection" => $DATABASE, "database" => $database, "tableName" => "users", "columns" => explode($WA_Auth_Separator,"userName".$WA_Auth_Separator."userPW"), "columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["username"]))?$_POST["username"]:"") ."".$WA_Auth_Separator."".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") .""), "columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"), "sessionColumns" => explode($WA_Auth_Separator,"userID".$WA_Auth_Separator."userGroup"), "sessionNames" => explode($WA_Auth_Separator,"userID".$WA_Auth_Separator."userGroup"), "successRedirect" => "HomePage.php", "failRedirect" => "FailedLogin.php", "gotoPreviousURL" => TRUE, "keepQueryString" => TRUE ); WA_AuthenticateUser($WA_Auth_Parameter); } ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Log In</title> <link href="WA_SecurityAssist/styles/Elemental_Deep Jungle.css" rel="stylesheet" type="text/css" /> <link href="WA_SecurityAssist/styles/Verdana.css" rel="stylesheet" type="text/css" /> <link href="styles.css" rel="stylesheet" type="text/css"> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center" > <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><div align="left"><img src="images/logo.jpg" width="245" height="92" hspace="50" /></div></td> <td><img src="images/member.png" width="280" height="38" /></td> </tr> </table> </div></td> </tr> <tr> <td><div align="center" ></div></td> </tr> </table></td> </tr> <tr> <td class="main-content"><div align="center"><br /> </div> <div id="LogInContainer" class="WAATK"> <form action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post" name="WAATKLogInForm" id="WAATKLogInForm"> <h1 align="center">Log In</h1> <div align="center"> <table class="WAATKDataTable" cellpadding="0" cellspacing="0" border="0"> <tr> <th>User name</th> <td><input type="text" class="WAATKTextField" name="username" value="" /></td> </tr> <tr> <th>Password</th> <td> <input type="password" class="WAATKTextField" name="userpassword" value="" /> </td> </tr> </table> </div> <div class="WAATKButtonRow"> <div align="center"> <input type="image" hspace="0" vspace="0" border="0" name="Log In" id="Log In" value="Log In" alt="Log In" src="WA_SecurityAssist/images/Deep Jungle/Ultramodern_login.gif" /> </div> </div> </form> </div></td> </tr> </table> </body> </html> Quote Link to comment Share on other sites More sharing options...
intltech Posted June 29, 2012 Author Share Posted June 29, 2012 If anyone is interested in the solution, we have resolved this problem & I'd be happy to explain. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.