Jump to content

Member Changing Password


Pavlos1316

Recommended Posts

Login script:

 

<?php

[color=red]db connection string[/color]

session_start();
$Username=$_POST['Username'];
$Password=md5($_POST['Password']);
$query="SELECT ID FROM Register WHERE Username='$Username' AND Password='$Password'";
$result=mysql_query($query);
if(mysql_num_rows($result)>0){
session_regenerate_id();
$member=mysql_fetch_assoc($result);
$_SESSION['SESS_ID']=$member['ID'];
session_write_close();
include 'members_area.php';
             exit();
?>

 

Authentication script:

 

<?php
session_start();
if(!isset($_SESSION['SESS_ID']) || (trim($_SESSION['SESS_ID'])=='')){
header("location: http://");
exit();
}
?>

sorry..

 

It was continued like

}else{
$error="Invalid Login";
}

 

I can't think what is wrong...

 

Maybe my authentication script when changing password automatically deletes the stored data so when the member tries to access another page is like his is not logged in!!

 

But how do I correct that?

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.