Intranet JournalThe new discussion forum for Intranet Journal readers. Leave comments and questions for IJ authors. Suggest story ideas and provide feedback.
i have been folowing the tutorial to a t and i have been really enjoying it but for some reason i have now been stoped dead in my tracks. i entred the folowing code into mySQL
INSERT INTO `cmsgroups` VALUES (1,'Admin');
INSERT INTO `cmsgroups` VALUES (2,'Editors');
INSERT INTO `cmsgroups` VALUES (3,NULL);
INSERT INTO `cmsgroups` VALUES (4,NULL);
INSERT INTO `cmsgroups` VALUES (5,NULL);
INSERT INTO `cmsgroups` VALUES (6,NULL);
INSERT INTO `cmsgroups` VALUES (7,NULL);
INSERT INTO `cmsgroups` VALUES (8,NULL);
INSERT INTO `cmsgroups` VALUES (9,NULL);
INSERT INTO `cmsgroups` VALUES (10,'Anonymous');
INSERT INTO `cmsusers` VALUES (1,'admin',PASSWORD('admin'),1,'Mr','Admin',1);
so i then tried to login to view welcome.php but returned a blank page so i then created a failed.php and when i entre the username admin and password admin i am sent to the failed page i created so i assume i have entred something into mySQL wrong if someone could tell me whythis is it would be grealy apreciated
I'm having the same problem.
I tried PeteZ's workaround(recreate table/edit Sentry.php) but still the same error occurs.
It seems whenever I use the correct user/pass combo, I'm redirected to login.php, but if it's an incorrect combo, I'm taken to 'failed.php'.
Could this be a session issue?
Having looked into this further, I'm guessing there's an issue with 'welcome.php' that forces the user to be redirected to 'login.php':
I've tried to add .ZIP file with all the files, but think I'm too new to do so
login.php
PHP Code:
<?php
require_once("../config/Sentry.php");
$sentry = new Sentry();
if ($_POST['user'] != '')
{
echo "<center>Username submitted</center><br>";
$sentry->checkLogin($HTTP_POST_VARS['user'],$HTTP_POST_VARS['pass'],4,'welcome.php','failed.php');
}
if($_POST['pass'] != '')
{
echo "<center>Password entered</center><br>";
}
if($_POST['pass'] == '')
{
echo "<center>Password is not yet entered</center><br>";
}
if($_POST['user'] == '')
{
echo "<center>No username submitted by form</center><br>";
}
if ($_GET['action'] == 'logout')
{
if ($sentry->logout())
{
echo '<center>You have been logged out</center><br>';
}
else
echo '<center>No need to log out, you were never logged in</center><br>';
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>