Jump to content

login problems


midriss

Recommended Posts

PLEASE HELP ME I am a newbie creating an a cms for a website. I have created the other sectond for adding contents and puting contents ito categories. however its the security as[pect thats giving me headache. The login page seen below does not work. i cant get to the welcome.php. when I put the correct user name and password. i only get to the failed .php page. please help me with this

<?php

require_once("../includes/Sentry.php");

 

$sentry = new Sentry();

if ($HTTP_POST_VARS['user'] != ''){

$sentry->checkLogin($HTTP_POST_VARS['user'],$HTTP_POST_VARS['pass'],4,'welcome.php','failed.php');

}

 

if ($HTTP_GET_VARS['action'] == 'logout'){

if ($sentry->logout()){

echo '<center>You have been logged out</center><br>';

}

}

?>

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body>

<table width="25%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000066">

  <tr>

    <td align="center" bgcolor="#000066"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Login</strong></font></td>

  </tr>

  <tr>

    <td bordercolor="#FFFFFF"><form name="form1" method="post" action="login.php">

        <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><br>

 User:

          <input type="text" name="user">

        </font></p>

        <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Pass:

              <input type="password" name="pass">

        </font></p>

        <p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">

          <input type="submit" name="Submit2" value="Submit">

        </font></p>

      </form>

        <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="login.php?action=logout">Logout</a> </font></div>

    </td>

  </tr>

</table>

</body>

</html>

 

Link to comment
https://forums.phpfreaks.com/topic/77015-login-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.