Jump to content

Error in CMS login system with IE. IT WORKS FINE WITH CHROME.


x-andeep

Recommended Posts

FOR the CMS go to http://sandeepthapa.com.np/project/admin

and login in

username: user

pasword: 123456

with both Chrome and IE. pleease

 

and site is http://sandeepthapa.com.np/project/

 

it works fine with Chrome, :( but not with IE.

please help me :(

this is my first CMS . i am learning..  it :D

i use joommla templetefor design. oz i am not a designer :D

 

 

 

//..here is the code for process_login.php  page :D

 

<?php require_once("includes/session.php"); ?><?php require_once("includes/connection.php"); ?><?php require_once("includes/functions.php"); ?><?php

 

if (logged_in()) {

redirect_to("content.php");

}

 

 

if (isset($_POST['submit']))

{

 

 

 

 

if(!$_POST['username'])

{

echo ' Make sure u type in username';

}

if( !$_POST['password'])

{

echo 'make sure you type password';

}

 

$username = trim(mysql_prep($_POST['username']));

$password = trim(mysql_prep($_POST['password']));

$hashed_password = sha1($password);

 

 

 

// Check database to see if username and the hashed password exist there.

$query = "SELECT id, username ";

$query .= "FROM users ";

$query .= "WHERE username = '{$username}' ";

//$query .= "AND hashed_password = '{$hashed_password}' ";

$query .= "AND hashed_password = '{$hashed_password}' ";

$query .= "LIMIT 1";

$result_set = mysql_query($query) or die(mysql_error());

if(!$result_set)

{die("Database connection failed: " . mysql_error());}

confirm_query($result_set);

if (mysql_num_rows($result_set) == 1) {

// username/password authenticated

// and only 1 match

$found_user = mysql_fetch_array($result_set);

//echo $found_user['id'];

 

 

$_SESSION['user_id'] = $found_user['id'];

$_SESSION['username'] = $found_user['username'];

 

 

 

//echo 'test query';

 

redirect_to("content.php");

}

}

 

                 

 

 

 

 

 

else

{

 

 

echo 'error'.mysql_error();

 

}

?>

</body>

</html>

 

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.