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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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