Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7195379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:34:03+00:00 2026-05-28T20:34:03+00:00

Sudden my website admin panel no longer works and i’ve tired many ways to

  • 0

Sudden my website admin panel no longer works and i’ve tired many ways to edit it and all are faild.

Please show me where the error should be

Database

CREATE TABLE `egadmin` (
`AdminID` int(10) NOT NULL auto_increment,
`username` varchar(50) NOT NULL default '',
`password` varchar(50) NOT NULL default '',
PRIMARY KEY  (`AdminID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

INSERT INTO `egadmin` VALUES (1, 'admin', 'pass');

conn.php [connection file]

<?php
$db_host = "localhost";
$db_username = "root";
$db_password = "mypass";
$db_name = "dbname";
$connection = mysql_connect($db_host, $db_username, $db_password) or die(mysql_error());
$db = mysql_select_db($db_name, $connection);
?>

index.php [Login Form]

<form action="validate.php" method="post">
ID <input type="text" name="userid" id="userid" />
Password <input type="password" name="password" id="password" />
<input type="submit" name="submit" value="Submit" />
</form>

validate.php [Login form send it to validate.php]

<?php
require_once("conn.php");

$user = $_POST["userid"];
$pass = sha1($_POST["password"]);

$query = "SELECT * FROM egadmin WHERE username = '$user' AND password = '$pass'";
$result = mysql_query($query);

if (mysql_fetch_row($result)) {
  session_start();
  header("Cache-control: private");
  $_SESSION["access"] = "granted";
  header("Location: secure.php");
} else
  header("Location: index.php");
?>

secure.php [Should be the protected file]

<?php
session_start();
header("Cache-control: private");
if ($_SESSION["access"] == "granted")
echo "blah blah blah";
else
header("Location: index.php");
?>

The problem

every time i enter correct login informations (username,password) it keep resend me to login form (index.php) so it looks like it can not create $_SESSION at all.

Any help please how to fix it or why that error

Note : PHP Version 5.2.17 | register_globals = On (also not working if it Off)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:34:05+00:00Added an answer on May 28, 2026 at 8:34 pm

    Your trying to compare a encrypted password to a non encrypted password. Make sure the pass in the database is also encrypted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website that I built a while ago. All of sudden, without
All of a sudden I go to my WordPress website and all the pages
All of a sudden I've been getting the following error when trying to do
I periodically get this problem where all of a sudden mako is using old
This was all working before and all the sudden it stopped working and I
I know this might sound really ridiculas but all of a sudden when I
My database server is using 100% of the processing all of a sudden and
UIImagePickerController is easy to use, but i'm all of a sudden finding it exasperating
I'm using Eclipse Galileo (v3.51). All of a sudden, after weeks of it starting
Im not sure why, but my app all of a sudden keeps force closing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.